Module org.jhotdraw8.graph
Package org.jhotdraw8.graph.path.algo
Class AnyIndexedVertexPathSearchAlgo<C extends Number & Comparable<C>>
java.lang.Object
org.jhotdraw8.graph.path.algo.AnyIndexedVertexPathSearchAlgo<C>
- Type Parameters:
C- the cost number type
- All Implemented Interfaces:
IndexedVertexPathSearchAlgo<C>
public class AnyIndexedVertexPathSearchAlgo<C extends Number & Comparable<C>>
extends Object
implements IndexedVertexPathSearchAlgo<C>
See
AnyArcPathSearchAlgo for a description of this
algorithm.
This implementation is optimized for IndexedDirectedGraph.
-
Constructor Summary
Constructors -
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.search(@NonNull Iterable<Integer> startVertices, @NonNull IntPredicate goalPredicate, @NonNull Function<Integer, Spliterator.OfInt> nextVerticesFunction, @NonNull AddToIntSet visited, int maxDepth) Search engine method.
-
Constructor Details
-
AnyIndexedVertexPathSearchAlgo
public AnyIndexedVertexPathSearchAlgo()
-
-
Method Details
-
search
public @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.- Specified by:
searchin interfaceIndexedVertexPathSearchAlgo<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 cost limit is ignoredcostFunction- the cost functionsumFunction- the sum function for adding two cost valuesvisited-- Returns:
-
search
public @Nullable IndexedVertexBackLink search(@NonNull Iterable<Integer> startVertices, @NonNull IntPredicate goalPredicate, @NonNull Function<Integer, Spliterator.OfInt> nextVerticesFunction, @NonNull AddToIntSet visited, int maxDepth) Search engine method.- Parameters:
startVertices- the set of start verticesgoalPredicate- the goal predicatenextVerticesFunction- the next vertices functionvisited- the set of visited vertices (seeAddToIntSet)maxDepth- the maximal depth (inclusive) of the search.- Returns:
-