Module org.jhotdraw8.graph
Package org.jhotdraw8.graph.path.algo
Interface ArcPathSearchAlgo<V,A,C extends Number & Comparable<C>>
- Type Parameters:
V- the vertex data typeA- the arrow data typeC- the cost number type
- All Known Implementing Classes:
AnyArcPathSearchAlgo,AnyShortestArcPathSearchAlgo,UniqueArcPathSearchAlgo,UniqueOnAcyclicGraphArcPathSearchAlgo,UniqueShortestArcPathSearchAlgo
public interface ArcPathSearchAlgo<V,A,C extends Number & Comparable<C>>
Interface for an arc path search algorithm over a directed graph.
-
Method Summary
Modifier and TypeMethodDescriptionsearch(@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, @NonNull AddToSet<V> visited) Search engine method.
-
Method Details
-
search
@Nullable ArcBackLinkWithCost<V,A, searchC> (@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, @NonNull AddToSet<V> visited) Search engine method.- Parameters:
startVertices- the set of start verticesgoalPredicate- the goal predicatenextArcsFunction- the next arcs 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
-