Module org.jhotdraw8.graph
Package org.jhotdraw8.graph.path.algo
Interface VertexPathSearchAlgo<V,C extends Number & Comparable<C>>
- Type Parameters:
V- the vertex data typeC- the cost number type
- All Known Implementing Classes:
AnyShortestVertexPathSearchAlgo,AnyVertexPathSearchAlgo,UniqueOnAcyclicGraphVertexPathSearchAlgo,UniqueOrOneHopVertexPathSearchAlgo,UniqueShortestVertexPathSearchAlgo,UniqueVertexPathSearchAlgo
public interface VertexPathSearchAlgo<V,C extends Number & Comparable<C>>
Interface for a vertex path search algorithm.
-
Method Summary
Modifier and TypeMethodDescriptionsearch(@NonNull Iterable<V> startVertices, @NonNull Predicate<V> goalPredicate, @NonNull Function<V, Iterable<V>> nextVerticesFunction, int maxDepth, @NonNull C zero, @NonNull C costLimit, @NonNull BiFunction<V, V, C> costFunction, @NonNull BiFunction<C, C, C> sumFunction, @NonNull AddToSet<V> visited) Search engine method.
-
Method Details
-
search
@Nullable VertexBackLinkWithCost<V,C> search(@NonNull Iterable<V> startVertices, @NonNull Predicate<V> goalPredicate, @NonNull Function<V, Iterable<V>> nextVerticesFunction, int maxDepth, @NonNull C zero, @NonNull C costLimit, @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 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 limitsumFunction- the sum function for adding two cost valuesvisited- the visited function- Returns:
- on success: a back link, otherwise: null
-