Module org.jhotdraw8.graph
Package org.jhotdraw8.graph.path.algo
Class AnyShortestVertexPathSearchAlgo<V,C extends Number & Comparable<C>>
java.lang.Object
org.jhotdraw8.graph.path.algo.AnyShortestVertexPathSearchAlgo<V,C>
- Type Parameters:
V- the vertex data typeC- the cost number type
- All Implemented Interfaces:
VertexPathSearchAlgo<V,C>
public class AnyShortestVertexPathSearchAlgo<V,C extends Number & Comparable<C>>
extends Object
implements VertexPathSearchAlgo<V,C>
See
AnyShortestArcPathSearchAlgo for a description of this
algorithm.-
Constructor Summary
Constructors -
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.
-
Constructor Details
-
AnyShortestVertexPathSearchAlgo
public AnyShortestVertexPathSearchAlgo()
-
-
Method Details
-
search
public @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.- Specified by:
searchin interfaceVertexPathSearchAlgo<V,C extends Number & Comparable<C>> - 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 maximal cost (inclusive) of a path. Must be >= zero.costFunction- the cost functionsumFunction- the sum function for adding two cost valuesvisited-- Returns:
- on success: a back link, otherwise: null
-