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

Type Parameters:
V - the vertex data type
C - the cost number type
All Known Implementing Classes:
SimpleReachabilityChecker

public interface ReachabilityChecker<V,C extends Number & Comparable<C>>
Interface for checking if there is a vertex sequence up to (inclusive) a maximal cost in a directed graph.
  • Method Details

    • isReachable

      boolean isReachable(@NonNull Iterable<V> startVertices, @NonNull Predicate<V> goalPredicate, int maxDepth, @NonNull C costLimit, @NonNull AddToSet<V> visited)
      Checks if a vertex sequence from a set of start vertices to a vertex that satisfies the goal predicate exists.
      Parameters:
      startVertices - the start vertices
      goalPredicate - the goal vertex
      maxDepth - the maximal depth (inclusive) of the search Must be >= 0.
      costLimit - the algorithm-specific cost limit
      visited - the visited function
      Returns:
      true if a sequence was found.
    • isReachable

      boolean isReachable(@NonNull V start, @NonNull Predicate<V> goalPredicate, int maxDepth, @NonNull C costLimit, @NonNull AddToSet<V> visited)
      Checks if a vertex sequence from a start vertex to a vertex that satisfies the goal predicate exists.
      Parameters:
      start - the start vertex
      goalPredicate - the goal vertex
      maxDepth - the maximal depth (inclusive) of the search Must be >= 0.
      costLimit - the algorithm-specific cost limit
      visited - the visited function
      Returns:
      true if a sequence was found.
    • isReachable

      boolean isReachable(@NonNull V start, @NonNull V goal, int maxDepth, @NonNull C costLimit, @NonNull AddToSet<V> visited)
      Checks if a vertex sequence from start to goal exists.
      Parameters:
      start - the start vertex
      goal - the goal vertex
      maxDepth - the maximal depth (inclusive) of the search Must be >= 0.
      costLimit - the algorithm-specific cost limit
      visited - the visited function
      Returns:
      true if a sequence was found.