Dijkstra class

Implementation of Dijkstra's algorithm.

@author {@link https://github.com/Mugen87|Mugen87}

Constructors

Dijkstra([Graph? graph, int source = -1, int target = -1])
Constructs an AStar algorithm object.

Properties

found bool
getter/setter pair
graph Graph?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
source int
getter/setter pair
target int
getter/setter pair

Methods

clear() Dijkstra
Clears the internal state of the object. A new search is now possible.
compare(Map<String, dynamic> a, Map<String, dynamic> b) int
getPath() List<int>
Returns the shortest path from the source to the target node as an array of node indices.
getSearchTree() List<Edge>
Returns the search tree of the algorithm as an array of edges.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
Executes the graph search. If the search was successful, {@link Dijkstra#found} is set to true.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited