Show / Hide Table of Contents

Class UndirectedDijkstraShortestPathAlgorithm<TVertex, TEdge>

A single source shortest path algorithm for undirected graph with positive distances.

Inheritance
System.Object
AlgorithmBase<IUndirectedGraph<TVertex, TEdge>>
RootedAlgorithmBase<TVertex, IUndirectedGraph<TVertex, TEdge>>
UndirectedShortestPathAlgorithmBase<TVertex, TEdge>
UndirectedDijkstraShortestPathAlgorithm<TVertex, TEdge>
Implements
IAlgorithm<IUndirectedGraph<TVertex, TEdge>>
IComputation
IAlgorithmComponent
IVertexColorizerAlgorithm<TVertex>
IDistancesCollection<TVertex>
IUndirectedVertexPredecessorRecorderAlgorithm<TVertex, TEdge>
IUndirectedTreeBuilderAlgorithm<TVertex, TEdge>
IDistanceRecorderAlgorithm<TVertex>
Inherited Members
UndirectedShortestPathAlgorithmBase<TVertex, TEdge>.Distances
UndirectedShortestPathAlgorithmBase<TVertex, TEdge>.GetVertexDistance(TVertex)
UndirectedShortestPathAlgorithmBase<TVertex, TEdge>.SetVertexDistance(TVertex, Double)
UndirectedShortestPathAlgorithmBase<TVertex, TEdge>.TryGetDistance(TVertex, Double)
UndirectedShortestPathAlgorithmBase<TVertex, TEdge>.GetDistance(TVertex)
UndirectedShortestPathAlgorithmBase<TVertex, TEdge>.GetDistances()
UndirectedShortestPathAlgorithmBase<TVertex, TEdge>.DistancesIndexGetter()
UndirectedShortestPathAlgorithmBase<TVertex, TEdge>.Weights
UndirectedShortestPathAlgorithmBase<TVertex, TEdge>.DistanceRelaxer
UndirectedShortestPathAlgorithmBase<TVertex, TEdge>.Initialize()
UndirectedShortestPathAlgorithmBase<TVertex, TEdge>.VerticesColors
UndirectedShortestPathAlgorithmBase<TVertex, TEdge>.GetVertexColor(TVertex)
UndirectedShortestPathAlgorithmBase<TVertex, TEdge>.TreeEdge
UndirectedShortestPathAlgorithmBase<TVertex, TEdge>.OnTreeEdge(TEdge, Boolean)
UndirectedShortestPathAlgorithmBase<TVertex, TEdge>.Relax(TEdge, TVertex, TVertex)
RootedAlgorithmBase<TVertex, IUndirectedGraph<TVertex, TEdge>>.TryGetRootVertex(TVertex)
RootedAlgorithmBase<TVertex, IUndirectedGraph<TVertex, TEdge>>.SetRootVertex(TVertex)
RootedAlgorithmBase<TVertex, IUndirectedGraph<TVertex, TEdge>>.ClearRootVertex()
RootedAlgorithmBase<TVertex, IUndirectedGraph<TVertex, TEdge>>.RootVertexChanged
RootedAlgorithmBase<TVertex, IUndirectedGraph<TVertex, TEdge>>.OnRootVertexChanged(EventArgs)
RootedAlgorithmBase<TVertex, IUndirectedGraph<TVertex, TEdge>>.GetAndAssertRootInGraph()
RootedAlgorithmBase<TVertex, IUndirectedGraph<TVertex, TEdge>>.AssertRootInGraph(TVertex)
RootedAlgorithmBase<TVertex, IUndirectedGraph<TVertex, TEdge>>.Compute(TVertex)
AlgorithmBase<IUndirectedGraph<TVertex, TEdge>>.SyncRoot
AlgorithmBase<IUndirectedGraph<TVertex, TEdge>>.State
AlgorithmBase<IUndirectedGraph<TVertex, TEdge>>.Compute()
AlgorithmBase<IUndirectedGraph<TVertex, TEdge>>.Abort()
AlgorithmBase<IUndirectedGraph<TVertex, TEdge>>.StateChanged
AlgorithmBase<IUndirectedGraph<TVertex, TEdge>>.OnStateChanged(EventArgs)
AlgorithmBase<IUndirectedGraph<TVertex, TEdge>>.Started
AlgorithmBase<IUndirectedGraph<TVertex, TEdge>>.OnStarted(EventArgs)
AlgorithmBase<IUndirectedGraph<TVertex, TEdge>>.Finished
AlgorithmBase<IUndirectedGraph<TVertex, TEdge>>.OnFinished(EventArgs)
AlgorithmBase<IUndirectedGraph<TVertex, TEdge>>.Aborted
AlgorithmBase<IUndirectedGraph<TVertex, TEdge>>.OnAborted(EventArgs)
AlgorithmBase<IUndirectedGraph<TVertex, TEdge>>.VisitedGraph
AlgorithmBase<IUndirectedGraph<TVertex, TEdge>>.Services
AlgorithmBase<IUndirectedGraph<TVertex, TEdge>>.GetService<T>()
AlgorithmBase<IUndirectedGraph<TVertex, TEdge>>.TryGetService<T>(T)
AlgorithmBase<IUndirectedGraph<TVertex, TEdge>>.TryGetService(Type, Object)
AlgorithmBase<IUndirectedGraph<TVertex, TEdge>>.ThrowIfCancellationRequested()
AlgorithmBase<IUndirectedGraph<TVertex, TEdge>>.Initialize()
AlgorithmBase<IUndirectedGraph<TVertex, TEdge>>.InternalCompute()
AlgorithmBase<IUndirectedGraph<TVertex, TEdge>>.Clean()
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.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 Source

UndirectedDijkstraShortestPathAlgorithm(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

visitedGraph is null.

System.ArgumentNullException

edgeWeights is null.

System.ArgumentNullException

distanceRelaxer is null.

| Improve this Doc View Source

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

visitedGraph is null.

System.ArgumentNullException

edgeWeights is null.

| Improve this Doc View Source

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

visitedGraph is null.

System.ArgumentNullException

edgeWeights is null.

System.ArgumentNullException

distanceRelaxer is null.

Methods

| Improve this Doc View Source

Initialize()

Called on algorithm initialization step.

Declaration
protected override void Initialize()
Overrides
QuikGraph.Algorithms.ShortestPath.UndirectedShortestPathAlgorithmBase<TVertex, TEdge>.Initialize()
| Improve this Doc View Source

InternalCompute()

Algorithm compute step.

Declaration
protected override void InternalCompute()
Overrides
QuikGraph.Algorithms.AlgorithmBase<QuikGraph.IUndirectedGraph<TVertex, TEdge>>.InternalCompute()

Events

| Improve this Doc View Source

DiscoverVertex

Fired when a vertex is discovered.

Declaration
public event VertexAction<TVertex> DiscoverVertex
Event Type
Type Description
VertexAction<TVertex>
| Improve this Doc View Source

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>
| Improve this Doc View Source

ExamineEdge

Fired when an edge is going to be analyzed.

Declaration
public event EdgeAction<TVertex, TEdge> ExamineEdge
Event Type
Type Description
EdgeAction<TVertex, TEdge>
| Improve this Doc View Source

ExamineVertex

Fired when a vertex is going to be analyzed.

Declaration
public event VertexAction<TVertex> ExamineVertex
Event Type
Type Description
VertexAction<TVertex>
| Improve this Doc View Source

FinishVertex

Fired when a vertex is fully treated.

Declaration
public event VertexAction<TVertex> FinishVertex
Event Type
Type Description
VertexAction<TVertex>
| Improve this Doc View Source

InitializeVertex

Fired when a vertex is initialized.

Declaration
public event VertexAction<TVertex> InitializeVertex
Event Type
Type Description
VertexAction<TVertex>
| Improve this Doc View Source

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>

Implements

IAlgorithm<TGraph>
IComputation
IAlgorithmComponent
IVertexColorizerAlgorithm<TVertex>
IDistancesCollection<TVertex>
IUndirectedVertexPredecessorRecorderAlgorithm<TVertex, TEdge>
IUndirectedTreeBuilderAlgorithm<TVertex, TEdge>
IDistanceRecorderAlgorithm<TVertex>

Extension Methods

GraphMLExtensions.SerializeToGraphML<TVertex, TEdge, TGraph>(TGraph, String)
GraphMLExtensions.SerializeToGraphML<TVertex, TEdge, TGraph>(TGraph, String, VertexIdentity<TVertex>, EdgeIdentity<TVertex, TEdge>)
GraphMLExtensions.SerializeToGraphML<TVertex, TEdge, TGraph>(TGraph, XmlWriter)
GraphMLExtensions.SerializeToGraphML<TVertex, TEdge, TGraph>(TGraph, XmlWriter, VertexIdentity<TVertex>, EdgeIdentity<TVertex, TEdge>)
GraphMLExtensions.DeserializeFromGraphML<TVertex, TEdge, TGraph>(TGraph, XmlReader, IdentifiableVertexFactory<TVertex>, IdentifiableEdgeFactory<TVertex, TEdge>)
GraphMLExtensions.DeserializeFromGraphML<TVertex, TEdge, TGraph>(TGraph, TextReader, IdentifiableVertexFactory<TVertex>, IdentifiableEdgeFactory<TVertex, TEdge>)
GraphMLExtensions.DeserializeFromGraphML<TVertex, TEdge, TGraph>(TGraph, String, IdentifiableVertexFactory<TVertex>, IdentifiableEdgeFactory<TVertex, TEdge>)
GraphMLExtensions.DeserializeAndValidateFromGraphML<TVertex, TEdge, TGraph>(TGraph, TextReader, IdentifiableVertexFactory<TVertex>, IdentifiableEdgeFactory<TVertex, TEdge>)
SerializationExtensions.SerializeToXml<TVertex, TEdge, TGraph>(TGraph, XmlWriter, VertexIdentity<TVertex>, EdgeIdentity<TVertex, TEdge>, String, String, String, String)
SerializationExtensions.SerializeToXml<TVertex, TEdge, TGraph>(TGraph, XmlWriter, VertexIdentity<TVertex>, EdgeIdentity<TVertex, TEdge>, String, String, String, String, Action<XmlWriter, TGraph>, Action<XmlWriter, TVertex>, Action<XmlWriter, TEdge>)
  • Improve this Doc
  • View Source
In This Article
Back to top QuikGraph