Show / Hide Table of Contents

Class RankedShortestPathAlgorithmBase<TVertex, TEdge, TGraph>

Base class for shortest path finder algorithms.

Inheritance
System.Object
AlgorithmBase<TGraph>
RootedAlgorithmBase<TVertex, TGraph>
RankedShortestPathAlgorithmBase<TVertex, TEdge, TGraph>
HoffmanPavleyRankedShortestPathAlgorithm<TVertex, TEdge>
Implements
IAlgorithm<TGraph>
IComputation
IAlgorithmComponent
Inherited Members
RootedAlgorithmBase<TVertex, TGraph>.TryGetRootVertex(TVertex)
RootedAlgorithmBase<TVertex, TGraph>.SetRootVertex(TVertex)
RootedAlgorithmBase<TVertex, TGraph>.ClearRootVertex()
RootedAlgorithmBase<TVertex, TGraph>.RootVertexChanged
RootedAlgorithmBase<TVertex, TGraph>.OnRootVertexChanged(EventArgs)
RootedAlgorithmBase<TVertex, TGraph>.GetAndAssertRootInGraph()
RootedAlgorithmBase<TVertex, TGraph>.AssertRootInGraph(TVertex)
RootedAlgorithmBase<TVertex, TGraph>.Compute(TVertex)
AlgorithmBase<TGraph>.SyncRoot
AlgorithmBase<TGraph>.State
AlgorithmBase<TGraph>.Compute()
AlgorithmBase<TGraph>.Abort()
AlgorithmBase<TGraph>.StateChanged
AlgorithmBase<TGraph>.OnStateChanged(EventArgs)
AlgorithmBase<TGraph>.Started
AlgorithmBase<TGraph>.OnStarted(EventArgs)
AlgorithmBase<TGraph>.Finished
AlgorithmBase<TGraph>.OnFinished(EventArgs)
AlgorithmBase<TGraph>.Aborted
AlgorithmBase<TGraph>.OnAborted(EventArgs)
AlgorithmBase<TGraph>.VisitedGraph
AlgorithmBase<TGraph>.Services
AlgorithmBase<TGraph>.GetService<T>()
AlgorithmBase<TGraph>.TryGetService<T>(T)
AlgorithmBase<TGraph>.TryGetService(Type, Object)
AlgorithmBase<TGraph>.ThrowIfCancellationRequested()
AlgorithmBase<TGraph>.InternalCompute()
AlgorithmBase<TGraph>.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.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 Source

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

visitedGraph is null.

System.ArgumentNullException

distanceRelaxer is null.

Properties

| Improve this Doc View Source

ComputedShortestPathCount

Gets the number of shortest path found.

Declaration
public int ComputedShortestPathCount { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

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

DistanceRelaxer

Distance relaxer.

Declaration
public IDistanceRelaxer DistanceRelaxer { get; }
Property Value
Type Description
IDistanceRelaxer
| Improve this Doc View Source

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 Source

AddComputedShortestPath(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.

| Improve this Doc View Source

Initialize()

Called on algorithm initialization step.

Declaration
protected override void Initialize()
Overrides
QuikGraph.Algorithms.AlgorithmBase<TGraph>.Initialize()

Implements

IAlgorithm<TGraph>
IComputation
IAlgorithmComponent

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