Interface IShortestPathFinder
An algorithm to find the shortest path (calculated as the number of edges forming the path) from a start vertex to an end vertex in a directed graph.
Namespace: MoreStructures.Graphs.ShortestPath
Assembly: MoreStructures.dll
Syntax
public interface IShortestPathFinder
Methods
| Improve this Doc View SourceFind(IGraph, Int32, Int32)
Finds the shortest path in the provided graph
from the start
vertex to
the end
vertex.
Declaration
(int, IList<int>) Find(IGraph graph, int start, int end)
Parameters
Type | Name | Description |
---|---|---|
IGraph | graph | The graph to traverse. |
System.Int32 | start | The id of the vertex, to start traversal from. |
System.Int32 | end | The id of the vertex, to end traversal at. |
Returns
Type | Description |
---|---|
System.ValueTuple<System.Int32, IList<System.Int32>> | A couple. The first item of the couple is the shortest distance, as number of edges of the shortest path
between |