Dijkstra class

A class with the tools needed to solve a shortest path problem with the Dijkstra algorithm.

Constructors

Dijkstra(Map<Vertex, List<Edge>> graph)

Properties

graph Map<Vertex, List<Edge>>
_graph contains the graph to which the dijkstra algorithm is applied
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

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
solve(Vertex start, Vertex destination) Path
A starting vertex start and a destination vertex destination are passed in order to solve the shortest path problem by using the dijkstra algorithm. A FIFO queue with each vertex is returned in which the shortest path is contained.
solveByString(String start, String destination) Path
Finds vertices by their strings and uses these to find the shortest path in between them.
toString() String
A string representation of this object.
inherited

Operators

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