Graph class abstract
A class that is an abstract implementation of a graph with vertices and edges. Has basic methods and structure.
- Implementers
Constructors
- Graph()
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getAllEdges(
) → List< Edge> - Returns a list of all edges in graph.
-
getAllVertices(
) → List< Vertex> - Returns a list of all vertices in graph.
-
getEdge(
Vertex a, Vertex b) → Edge -
Returns an Edge in a graph with Vertex
a
andb
-
getEdgeByString(
String a, String b) → Edge -
Searches graph and finds and returns an edge with the same name as the specified
a
andb
string. -
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. -
getNeighboringEdgesOfEdge(
Edge edge) → List< Edge> -
Gets all neighboring edges of an
edge
-
getNeighboringEdgesOfEdgeByString(
String a, String b) → List< Edge> -
Gets all neighboring edges of an edge searched for by
a
andb
-
getOutgoingEdges(
Vertex vertex) → List< Edge> - Gets all neighboring edges of a vertex
-
getOutgoingEdgesByString(
String source) → List< Edge> -
Gets all neighboring edges of a
source
that gets searched by string in graph -
getPathWeight(
Path path) → double -
Gets the weight of a specified
path
-
getVertex(
Vertex vertex) → Vertex - Searches graph and finds and returns a vertex.
-
getVertexByString(
String source) → Vertex -
Searches graph and finds and returns a vertex with the same name as the specified
source
string. -
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