Class RankedShortestPathAlgorithmBase<TVertex, TEdge, TGraph>
Base class for shortest path finder algorithms.
Inheritance
System.Object
AlgorithmBase<TGraph>
RootedAlgorithmBase<TVertex, TGraph>
RankedShortestPathAlgorithmBase<TVertex, TEdge, TGraph>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: QuikGraph.Algorithms.RankedShortestPath
Assembly: QuikGraph.dll
Syntax
public abstract class RankedShortestPathAlgorithmBase<TVertex, TEdge, TGraph> : RootedAlgorithmBase<TVertex, TGraph>, IAlgorithm<TGraph>, IComputation, IAlgorithmComponent where TEdge : IEdge<TVertex> where TGraph : IGraph<TVertex, TEdge>, IImplicitVertexSet<TVertex>
Type Parameters
Name | Description |
---|---|
TVertex | Vertex type. |
TEdge | Edge type. |
TGraph | Graph type. |
Constructors
| Improve this Doc View SourceRankedShortestPathAlgorithmBase(IAlgorithmComponent, TGraph, IDistanceRelaxer)
Initializes a new instance of the RankedShortestPathAlgorithmBase<TVertex, TEdge, TGraph> class.
Declaration
protected RankedShortestPathAlgorithmBase(IAlgorithmComponent host, TGraph visitedGraph, IDistanceRelaxer distanceRelaxer)
Parameters
Type | Name | Description |
---|---|---|
IAlgorithmComponent | host | Host to use if set, otherwise use this reference. |
TGraph | visitedGraph | Graph to visit. |
IDistanceRelaxer | distanceRelaxer | Distance relaxer. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
System.ArgumentNullException |
|
Properties
| Improve this Doc View SourceComputedShortestPathCount
Gets the number of shortest path found.
Declaration
public int ComputedShortestPathCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
ComputedShortestPaths
Enumerable of shortest paths found.
Declaration
public IEnumerable<IEnumerable<TEdge>> ComputedShortestPaths { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Collections.Generic.IEnumerable<TEdge>> |
DistanceRelaxer
Distance relaxer.
Declaration
public IDistanceRelaxer DistanceRelaxer { get; }
Property Value
Type | Description |
---|---|
IDistanceRelaxer |
ShortestPathCount
Gets or sets the maximum number of shortest path to find.
Declaration
public int ShortestPathCount { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | Value is lower or equal to 1. |
Methods
| Improve this Doc View SourceAddComputedShortestPath(IEnumerable<TEdge>)
Adds the given path
to the set of found shortest paths.
Declaration
protected void AddComputedShortestPath(IEnumerable<TEdge> path)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<TEdge> | path | Path to add. |
Initialize()
Called on algorithm initialization step.
Declaration
protected override void Initialize()
Overrides
QuikGraph.Algorithms.AlgorithmBase<TGraph>.Initialize()