Class UndirectedDijkstraShortestPathAlgorithm<TVertex, TEdge>
A single source shortest path algorithm for undirected graph with positive distances.
Inheritance
Implements
Inherited Members
Namespace: QuikGraph.Algorithms.ShortestPath
Assembly: QuikGraph.dll
Syntax
public sealed class UndirectedDijkstraShortestPathAlgorithm<TVertex, TEdge> : UndirectedShortestPathAlgorithmBase<TVertex, TEdge>, IAlgorithm<IUndirectedGraph<TVertex, TEdge>>, IComputation, IAlgorithmComponent, IVertexColorizerAlgorithm<TVertex>, IDistancesCollection<TVertex>, IUndirectedVertexPredecessorRecorderAlgorithm<TVertex, TEdge>, IUndirectedTreeBuilderAlgorithm<TVertex, TEdge>, IDistanceRecorderAlgorithm<TVertex> where TEdge : IEdge<TVertex>
Type Parameters
Name | Description |
---|---|
TVertex | Vertex type. |
TEdge | Edge type. |
Constructors
| Improve this Doc View SourceUndirectedDijkstraShortestPathAlgorithm(IAlgorithmComponent, IUndirectedGraph<TVertex, TEdge>, Func<TEdge, Double>, IDistanceRelaxer)
Initializes a new instance of the UndirectedDijkstraShortestPathAlgorithm<TVertex, TEdge> class.
Declaration
public UndirectedDijkstraShortestPathAlgorithm(IAlgorithmComponent host, IUndirectedGraph<TVertex, TEdge> visitedGraph, Func<TEdge, double> edgeWeights, IDistanceRelaxer distanceRelaxer)
Parameters
Type | Name | Description |
---|---|---|
IAlgorithmComponent | host | Host to use if set, otherwise use this reference. |
IUndirectedGraph<TVertex, TEdge> | visitedGraph | Graph to visit. |
System.Func<TEdge, System.Double> | edgeWeights | Function that computes the weight for a given edge. |
IDistanceRelaxer | distanceRelaxer | Distance relaxer. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
System.ArgumentNullException |
|
System.ArgumentNullException |
|
UndirectedDijkstraShortestPathAlgorithm(IUndirectedGraph<TVertex, TEdge>, Func<TEdge, Double>)
Initializes a new instance of the UndirectedDijkstraShortestPathAlgorithm<TVertex, TEdge> class.
Declaration
public UndirectedDijkstraShortestPathAlgorithm(IUndirectedGraph<TVertex, TEdge> visitedGraph, Func<TEdge, double> edgeWeights)
Parameters
Type | Name | Description |
---|---|---|
IUndirectedGraph<TVertex, TEdge> | visitedGraph | Graph to visit. |
System.Func<TEdge, System.Double> | edgeWeights | Function that computes the weight for a given edge. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
System.ArgumentNullException |
|
UndirectedDijkstraShortestPathAlgorithm(IUndirectedGraph<TVertex, TEdge>, Func<TEdge, Double>, IDistanceRelaxer)
Initializes a new instance of the UndirectedDijkstraShortestPathAlgorithm<TVertex, TEdge> class.
Declaration
public UndirectedDijkstraShortestPathAlgorithm(IUndirectedGraph<TVertex, TEdge> visitedGraph, Func<TEdge, double> edgeWeights, IDistanceRelaxer distanceRelaxer)
Parameters
Type | Name | Description |
---|---|---|
IUndirectedGraph<TVertex, TEdge> | visitedGraph | Graph to visit. |
System.Func<TEdge, System.Double> | edgeWeights | Function that computes the weight for a given edge. |
IDistanceRelaxer | distanceRelaxer | Distance relaxer. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
System.ArgumentNullException |
|
System.ArgumentNullException |
|
Methods
| Improve this Doc View SourceInitialize()
Called on algorithm initialization step.
Declaration
protected override void Initialize()
Overrides
InternalCompute()
Algorithm compute step.
Declaration
protected override void InternalCompute()
Overrides
Events
| Improve this Doc View SourceDiscoverVertex
Fired when a vertex is discovered.
Declaration
public event VertexAction<TVertex> DiscoverVertex
Event Type
Type | Description |
---|---|
VertexAction<TVertex> |
EdgeNotRelaxed
Fired when relax of an edge does not decrease distance.
Declaration
public event UndirectedEdgeAction<TVertex, TEdge> EdgeNotRelaxed
Event Type
Type | Description |
---|---|
UndirectedEdgeAction<TVertex, TEdge> |
ExamineEdge
Fired when an edge is going to be analyzed.
Declaration
public event EdgeAction<TVertex, TEdge> ExamineEdge
Event Type
Type | Description |
---|---|
EdgeAction<TVertex, TEdge> |
ExamineVertex
Fired when a vertex is going to be analyzed.
Declaration
public event VertexAction<TVertex> ExamineVertex
Event Type
Type | Description |
---|---|
VertexAction<TVertex> |
FinishVertex
Fired when a vertex is fully treated.
Declaration
public event VertexAction<TVertex> FinishVertex
Event Type
Type | Description |
---|---|
VertexAction<TVertex> |
InitializeVertex
Fired when a vertex is initialized.
Declaration
public event VertexAction<TVertex> InitializeVertex
Event Type
Type | Description |
---|---|
VertexAction<TVertex> |
StartVertex
Fired on a starting vertex once before the start of the search from it.
Declaration
public event VertexAction<TVertex> StartVertex
Event Type
Type | Description |
---|---|
VertexAction<TVertex> |