Graph<V> class

Implementers
Available extensions

Constructors

Graph.new({required List<Vertex<V>> vertices, List<Edge<V>> edges = const [], GraphMetadaProvider metadataProvider = const GraphMetadaProvider()})
Graph.copy(Graph<V> graph)
Graph.empty({GraphMetadaProvider metadataProvider = const GraphMetadaProvider()})

Properties

edges Map<IndexedEdgeId, Edge<V>>
final
hashCode int
The hash code for this object.
no setterinherited
metadata GraphMetadata<V>
no setter
metadataProvider GraphMetadaProvider
final
order int
Returns the number of vertices
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sinks Map<V, Vertex<V>>

Available on Graph<V>, provided by the GraphQueries extension

no setter
size int
Returns the total number of unique edges
no setter
size2 int
Returns the number of edges
no setter
sources Map<V, Vertex<V>>

Available on Graph<V>, provided by the GraphQueries extension

no setter
uniqueEdges Map<EdgeId<V>, List<Edge<V>>>
final
vertices Map<V, Vertex<V>>
final

Methods

addGraph(Graph<V> graph) GraphSnapshot<V>
addVertex(Vertex<V> vertex) GraphSnapshot<V>
childrenOf(Vertex<V> vertex) Map<V, Vertex<V>>
childrenOfById(V id) Map<V, Vertex<V>>
diffGraph(Graph<V> graph) GraphSnapshot<V>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parentsOf(Vertex<V> vertex) Map<V, Vertex<V>>
parentsOfById(V id) Map<V, Vertex<V>>
removeVertex(Vertex<V> vertex) GraphSnapshot<V>
removeVertexById(V id) GraphSnapshot<V>
toString() String
A string representation of this object.
inherited

Operators

operator +(Object other) GraphSnapshot<V>
operator -(Object other) GraphSnapshot<V>
operator ==(Object other) bool
The equality operator.
inherited