Table of Contents

Class AShortestPathsSolver

Namespace
Italbytz.Graph
Assembly
Italbytz.Graph.dll
public abstract class AShortestPathsSolver : IShortestPathsSolver, ISolver<IShortestPathsParameters, IShortestPathsSolution>
Inheritance
AShortestPathsSolver
Implements
Derived
Inherited Members

Constructors

AShortestPathsSolver(string, bool)

public AShortestPathsSolver(string rootVertex = "A", bool saveGraphs = false)

Parameters

rootVertex string
saveGraphs bool

Fields

examinedEdges

protected readonly Dictionary<(string, string, double), bool> examinedEdges

Field Value

Dictionary<(string, string, double), bool>

expandedVertices

protected readonly Dictionary<string, bool> expandedVertices

Field Value

Dictionary<string, bool>

file

protected int file

Field Value

int

originalGraph

protected IUndirectedGraph<string, ITaggedEdge<string, double>>? originalGraph

Field Value

IUndirectedGraph<string, ITaggedEdge<string, double>>

rootVertex

protected string rootVertex

Field Value

string

saveGraphs

protected bool saveGraphs

Field Value

bool

treeEdges

protected readonly Dictionary<(string, string, double), bool> treeEdges

Field Value

Dictionary<(string, string, double), bool>

verticesCost

protected readonly Dictionary<string, double> verticesCost

Field Value

Dictionary<string, double>

Methods

ExamineEdgeHandler(TaggedEdge<string, double>)

protected void ExamineEdgeHandler(TaggedEdge<string, double> edge)

Parameters

edge TaggedEdge<string, double>

GetAlgorithm(BidirectionalGraph<string, TaggedEdge<string, double>>)

protected abstract ShortestPathAlgorithmBase<string, TaggedEdge<string, double>, IVertexListGraph<string, TaggedEdge<string, double>>> GetAlgorithm(BidirectionalGraph<string, TaggedEdge<string, double>> graph)

Parameters

graph BidirectionalGraph<string, TaggedEdge<string, double>>

Returns

ShortestPathAlgorithmBase<string, TaggedEdge<string, double>, IVertexListGraph<string, TaggedEdge<string, double>>>

InitializeEdgesDictionaries(IEnumerable<TaggedEdge<string, double>>)

protected void InitializeEdgesDictionaries(IEnumerable<TaggedEdge<string, double>> edges)

Parameters

edges IEnumerable<TaggedEdge<string, double>>

InitializeVerticesDictionaries(IEnumerable<string>)

protected void InitializeVerticesDictionaries(IEnumerable<string> vertices)

Parameters

vertices IEnumerable<string>

Solve(IShortestPathsParameters)

public IShortestPathsSolution Solve(IShortestPathsParameters parameters)

Parameters

parameters IShortestPathsParameters

Returns

IShortestPathsSolution

TreeEdgeHandler(TaggedEdge<string, double>)

protected void TreeEdgeHandler(TaggedEdge<string, double> edge)

Parameters

edge TaggedEdge<string, double>