Graph<T extends Node<T> > class
abstract
The A* class works on any class that implements the Graph interface.
Constructors
- Graph()
Properties
-
allNodes
→ Iterable<
T> -
Returns an Iterable of all the nodes of the Graph. This is accessed
only during the setup phase, so it's not critical to optimize this.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getDistance(
T a, T b) → num -
Given two adjancent Nodes, returns the cost (distance) from
a
tob
(the direction can matter). Returnsnull
ifb
is not reachable froma
. -
getHeuristicDistance(
T a, T b) → num - Given two nodes (not necessarily adjancent), returns an estimate of the distance between them. The better the estimate, the more direct is the search. But better estimates also often mean slower performance. (The search works even if the return from the heuristic function is constant. The A* search becomes breadth-first search.)
-
getNeighboursOf(
T node) → Iterable< T> - Given a node, return all connected nodes.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited