Interface VertexReachabilityAlgo<V,C extends Number & Comparable<C>>

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

public interface VertexReachabilityAlgo<V,C extends Number & Comparable<C>>
Interface for a reachability test algorithm.
  • Method Details

    • tryToReach

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