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
aandb -
getEdgeByString(
String a, String b) → Edge -
Searches graph and finds and returns an edge with the same name as the specified
aandbstring. -
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. -
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
aandb -
getOutgoingEdges(
Vertex vertex) → List< Edge> - Gets all neighboring edges of a vertex
-
getOutgoingEdgesByString(
String source) → List< Edge> -
Gets all neighboring edges of a
sourcethat 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
sourcestring. -
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