Class AllPairsShortestPaths<TVertex, TWeight>
- Namespace
- Graph1x.Algorithms
- Assembly
- Graph1x.dll
The result of a Floyd-Warshall computation: shortest distances and paths between every pair of vertices, queryable via Between(TVertex, TVertex).
public sealed class AllPairsShortestPaths<TVertex, TWeight> where TVertex : notnull where TWeight : INumber<TWeight>
Type Parameters
TVertexThe vertex type.
TWeightThe numeric weight type.
- Inheritance
-
AllPairsShortestPaths<TVertex, TWeight>
- Inherited Members
Methods
Between(TVertex, TVertex)
Gets the shortest path from source to target.
public ShortestPathResult<TVertex, TWeight> Between(TVertex source, TVertex target)
Parameters
sourceTVertexThe start vertex.
targetTVertexThe end vertex.
Returns
- ShortestPathResult<TVertex, TWeight>
The query result, unreachable when no path exists.
Exceptions
- ArgumentException
Either vertex was not part of the analyzed graph.