Interface ArcReachabilityAlgo<V,A,C extends Number & Comparable<C>>

Type Parameters:
V - the vertex data type
A - the arrow data type
C - the cost number type

public interface ArcReachabilityAlgo<V,A,C extends Number & Comparable<C>>
Interface for a reachability checker algorithm over a directed graph.
  • Method Details

    • tryToReach

      boolean tryToReach(@NonNull Iterable<V> startVertices, @NonNull Predicate<V> goalPredicate, @NonNull Function<V,Iterable<Arc<V,A>>> nextArcsFunction, int maxDepth, @NonNull C zero, @NonNull C costLimit, @NonNull Function3<V,V,A,C> costFunction, @NonNull BiFunction<C,C,C> sumFunction)
      Search engine method.
      Parameters:
      startVertices - the set of start vertices
      goalPredicate - the goal predicate
      nextArcsFunction - the next arcs function
      maxDepth - the maximal depth (inclusive) of the search Must be >= 0.
      zero - the zero cost value
      costLimit - the algorithm-specific cost limit.
      costFunction - the cost function
      sumFunction - the sum function for adding two cost values
      Returns:
      true on success