Table of Contents

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

TVertex

The vertex type.

TWeight

The 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

source TVertex

The start vertex.

target TVertex

The 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.