Module org.jhotdraw8.graph
Package org.jhotdraw8.graph.path.algo
Interface IndexedVertexPathSearchAlgo<C extends Number & Comparable<C>>
- Type Parameters:
C- the cost number type
- All Known Implementing Classes:
AnyIndexedVertexPathSearchAlgo
public interface IndexedVertexPathSearchAlgo<C extends Number & Comparable<C>>
Interface for a vertex path search algorithm over an indexed directed
graph.
-
Method Summary
Modifier and TypeMethodDescriptionsearch(@NonNull Iterable<Integer> startVertices, @NonNull IntPredicate goalPredicate, @NonNull Function<Integer, Spliterator.OfInt> nextVerticesFunction, int maxDepth, @NonNull C zero, @NonNull C costLimit, @NonNull BiFunction<Integer, Integer, C> costFunction, @NonNull BiFunction<C, C, C> sumFunction, @NonNull AddToIntSet visited) Search engine method.
-
Method Details
-
search
@Nullable IndexedVertexBackLinkWithCost<C> search(@NonNull Iterable<Integer> startVertices, @NonNull IntPredicate goalPredicate, @NonNull Function<Integer, Spliterator.OfInt> nextVerticesFunction, int maxDepth, @NonNull C zero, @NonNull C costLimit, @NonNull BiFunction<Integer, Integer, C> costFunction, @NonNull BiFunction<C, C, C> sumFunction, @NonNull AddToIntSet visited) Search engine method.- Parameters:
startVertices- the set of start verticesgoalPredicate- the goal predicatenextVerticesFunction- the next vertices functionmaxDepth- the maximal depth (inclusive) of the search Must be >= 0.zero- the zero cost valuecostLimit- the algorithm-specific cost limit.costFunction- the cost functionsumFunction- the sum function for adding two cost valuesvisited- the visited function- Returns:
- on success: a back link, otherwise: null
-