FloydWarshall<V> class final

The result of the Floyd-Warshall all-pairs shortest paths algorithm.

Constructors

FloydWarshall(num _edgeCost(V source, V target), Map<V, Map<V, FloydWarshallState<V>>> _pairs)

Properties

averagePathLength → double
Returns the average shortest path length between all distinct pairs of connected vertices.
no setter
center → Set<V>
Returns the center of the graph, which is the set of vertices whose eccentricity equals the radius.
no setter
diameter → num
Returns the diameter of the graph, which is the maximum eccentricity among all vertices in the graph.
no setter
hashCode → int
The hash code for this object.
no setterinherited
periphery → Set<V>
Returns the periphery of the graph, which is the set of vertices whose eccentricity equals the diameter.
no setter
radius → num
Returns the radius of the graph, which is the minimum eccentricity among all vertices in the graph.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

allPaths({Iterable<V>? sourceVertices, Iterable<V>? targetVertices}) → Iterable<Path<V, num>>
Returns all paths between all vertices.
closenessCentrality(V vertex, {bool normalized = true}) → double
Returns the closeness centrality of vertex, which is the reciprocal of the sum of shortest-path distances to all other reachable vertices.
distance(V source, V target) → num
Returns the minimum distance between source and target, or double.infinity if the two vertices are not connected.
eccentricity(V vertex) → num
Returns the eccentricity of vertex, which is the maximum distance from vertex to any other reachable vertex.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
path(V source, V target) → Path<V, num>?
Returns the path between source and target. Returns null, if there is no such path.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited