V - the vertex type of the path finderpublic final class AStarPathfinder<V> extends java.lang.Object implements Pathfinder<V>
| Constructor and Description |
|---|
AStarPathfinder(GraphDataProvider<V> graph) |
| Modifier and Type | Method and Description |
|---|---|
static <T> AStarPathfinder<T> |
create(GraphDataProvider<T> graph) |
PathfindingResult<V> |
execute(V from,
V to) |
long |
getTimeout()
gets the currently set timeout value or
0 if timeouts are
disabled. |
void |
setTimeout(long timeout)
set a timeout for the pathfinding.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfindPathpublic AStarPathfinder(GraphDataProvider<V> graph)
public static <T> AStarPathfinder<T> create(GraphDataProvider<T> graph)
public void setTimeout(long timeout)
Pathfindernull.
By default timeouts are not supported and an
UnsupportedOperationException is thrown.setTimeout in interface Pathfinder<V>timeout - the timeout in milliseconds. A value of 0 or less
disables timeout.public long getTimeout()
Pathfinder0 if timeouts are
disabled.
By default timeouts are not supported and an
UnsupportedOperationException is thrown.getTimeout in interface Pathfinder<V>public PathfindingResult<V> execute(V from, V to)
execute in interface Pathfinder<V>Copyright © 2018. All Rights Reserved.