DirectedGraph class
An implementation of a graph with directed edges.
Constructors
-
DirectedGraph(Map<
Vertex, List< graph)Edge> >
Properties
Methods
-
getAllEdges(
) → List< Edge> -
Returns a list of all edges in graph.
override
-
getAllVertices(
) → List< Vertex> -
Returns a list of all vertices in graph.
override
-
getEdge(
Vertex a, Vertex b) → Edge -
Returns an Edge in a graph with Vertex
a
andb
override -
getEdgeByString(
String a, String b) → Edge -
Searches graph and finds and returns an edge with the same name as the specified
a
andb
string.override -
getEdgeWeight(
Vertex a, Vertex b) → double -
A Method to get the weight of an edge. Because the graph has directional nodes
you need to specify a starting node
a
and an ending nodeb
. Because this is a directed grapha
andb
are NOT interchangeable.override -
getNeighboringEdgesOfEdge(
Edge edge) → List< DirectedEdge> -
Gets all neighboring edges of an
edge
override -
getNeighboringEdgesOfEdgeByString(
String a, String b) → List< DirectedEdge> -
Gets all neighboring edges of an edge searched for by
a
andb
override -
getOutgoingEdges(
Vertex vertex) → List< DirectedEdge> -
Gets all neighboring edges of a vertex
override
-
getOutgoingEdgesByString(
String source) → List< DirectedEdge> -
Gets all neighboring edges of a
source
that gets searched by string in graphoverride -
getPathWeight(
Path path) → double -
Gets the weight of a specified
path
override -
getVertex(
Vertex vertex) → Vertex -
Searches graph and finds and returns a vertex.
override
-
getVertexByString(
String source) → Vertex -
Searches graph and finds and returns a vertex with the same name as the specified
source
string.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited