UndirectedGraph class
An implementation of a weighted, undirected graph.
Constructors
-
UndirectedGraph(Map<
Vertex, List< graph)UndirectedEdge> >
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
aandboverride -
getEdgeByString(
String a, String b) → Edge -
Searches graph and finds and returns an edge with the same name as the specified
aandbstring.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
aand an ending nodeb. Because this is a directed graphaandbare NOT interchangeable.override -
getNeighboringEdgesOfEdge(
Edge edge) → List< UndirectedEdge> -
Gets all neighboring edges of an
edgeoverride -
getNeighboringEdgesOfEdgeByString(
String a, String b) → List< UndirectedEdge> -
Gets all neighboring edges of an edge searched for by
aandboverride -
getOutgoingEdges(
Vertex vertex) → List< UndirectedEdge> -
Gets all neighboring edges of a vertex
override
-
getOutgoingEdgesByString(
String source) → List< UndirectedEdge> -
Gets all neighboring edges of a
sourcethat gets searched by string in graphoverride -
getPathWeight(
Path path) → double -
Gets the weight of a specified
pathoverride -
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
sourcestring.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