N - Type of nodepublic interface PathFinder<N>
PathFinder that can find a path from one node in an arbitrary graph to a goal node
based on information provided by that graph.
A fully implemented path finder can perform both interruptible and non-interruptible searches. If a specific path finder is not
able to perform one of the two type of search then the corresponding method should throw an
UnsupportedOperationException.
| Modifier and Type | Method and Description |
|---|---|
boolean |
search(PathFinderRequest<N> request,
long timeToRun)
Performs an interruptible search, trying to find a path made up of nodes from the start node to the goal node attempting to
honor costs provided by the graph.
|
boolean |
searchConnectionPath(N startNode,
N endNode,
Heuristic<N> heuristic,
GraphPath<Connection<N>> outPath)
Performs a non-interruptible search, trying to find a path made up of connections from the start node to the goal node
attempting to honor costs provided by the graph.
|
boolean |
searchNodePath(N startNode,
N endNode,
Heuristic<N> heuristic,
GraphPath<N> outPath)
Performs a non-interruptible search, trying to find a path made up of nodes from the start node to the goal node attempting
to honor costs provided by the graph.
|
boolean searchConnectionPath(N startNode, N endNode, Heuristic<N> heuristic, GraphPath<Connection<N>> outPath)
startNode - the start nodeendNode - the end nodeheuristic - the heuristic functionoutPath - the output path that will only be filled if a path is found, otherwise it won't get touched.true if a path was found; false otherwise.boolean searchNodePath(N startNode, N endNode, Heuristic<N> heuristic, GraphPath<N> outPath)
startNode - the start nodeendNode - the end nodeheuristic - the heuristic functionoutPath - the output path that will only be filled if a path is found, otherwise it won't get touched.true if a path was found; false otherwise.boolean search(PathFinderRequest<N> request, long timeToRun)
request - the pathfinding requesttimeToRun - the time in nanoseconds that can be used to advance the searchtrue if the search has finished; false otherwise.