Show / Hide Table of Contents

Class DirectedWeightMatrixAlgorithm<T>

An algorithm to calculate a turn-aware weight matrix.

Inheritance
System.Object
AlgorithmBase
DirectedWeightMatrixAlgorithm<T>
DirectedAugmentedWeightMatrixAlgorithm
DirectedWeightMatrixAlgorithm
Inherited Members
AlgorithmBase.HasRun
AlgorithmBase.HasSucceeded
AlgorithmBase.ErrorMessage
AlgorithmBase.CheckHasRun()
AlgorithmBase.CheckHasRunAndHasSucceeded()
AlgorithmBase.Run()
AlgorithmBase.Run(CancellationToken)
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: System.Dynamic.ExpandoObject
Assembly: cs.temp.dll.dll
Syntax
public class DirectedWeightMatrixAlgorithm<T> : AlgorithmBase, IDirectedWeightMatrixAlgorithm<T>, IAlgorithm where T : struct
Type Parameters
T

Constructors

DirectedWeightMatrixAlgorithm(RouterBase, IProfileInstance, WeightHandler<T>, Coordinate[], Nullable<T>)

Creates a new weight-matrix algorithm.

Declaration
public DirectedWeightMatrixAlgorithm(RouterBase router, IProfileInstance profile, WeightHandler<T> weightHandler, Coordinate[] locations, T? max = default (T? ))
Parameters
RouterBase router

IProfileInstance profile

WeightHandler<T> weightHandler

Coordinate[] locations

System.Nullable<T> max

DirectedWeightMatrixAlgorithm(RouterBase, IProfileInstance, WeightHandler<T>, IMassResolvingAlgorithm, Nullable<T>)

Creates a new weight-matrix algorithm.

Declaration
public DirectedWeightMatrixAlgorithm(RouterBase router, IProfileInstance profile, WeightHandler<T> weightHandler, IMassResolvingAlgorithm massResolver, T? max = default (T? ))
Parameters
RouterBase router

IProfileInstance profile

WeightHandler<T> weightHandler

IMassResolvingAlgorithm massResolver

System.Nullable<T> max

DirectedWeightMatrixAlgorithm(RouterBase, IProfileInstance, WeightHandler<T>, List<RouterPoint>, Nullable<T>)

Creates a new weight-matrix algorithm.

Declaration
public DirectedWeightMatrixAlgorithm(RouterBase router, IProfileInstance profile, WeightHandler<T> weightHandler, List<RouterPoint> resolvedLocations, T? max = default (T? ))
Parameters
RouterBase router

IProfileInstance profile

WeightHandler<T> weightHandler

List<RouterPoint> resolvedLocations

System.Nullable<T> max

Fields

_buckets

Declaration
protected readonly Dictionary<uint, Dictionary<int, LinkedEdgePath<T>>> _buckets
Field Value
Dictionary<System.UInt32, Dictionary<System.Int32, LinkedEdgePath<T>>>

_correctedIndices

Declaration
protected List<int> _correctedIndices
Field Value
List<System.Int32>

_correctedResolvedPoints

Declaration
protected List<RouterPoint> _correctedResolvedPoints
Field Value
List<RouterPoint>

_dualGraph

Declaration
protected readonly DirectedMetaGraph _dualGraph
Field Value
DirectedMetaGraph

_errors

Declaration
protected Dictionary<int, RouterPointError> _errors
Field Value
Dictionary<System.Int32, RouterPointError>

_graph

Declaration
protected readonly DirectedDynamicGraph _graph
Field Value
DirectedDynamicGraph

_massResolver

Declaration
protected readonly IMassResolvingAlgorithm _massResolver
Field Value
IMassResolvingAlgorithm

_max

Declaration
protected readonly T _max
Field Value
T

_profile

Declaration
protected readonly IProfileInstance _profile
Field Value
IProfileInstance

_router

Declaration
protected readonly RouterBase _router
Field Value
RouterBase

_sourcePaths

Declaration
protected EdgePath<T>[] _sourcePaths
Field Value
EdgePath<T>[]

_targetPaths

Declaration
protected EdgePath<T>[] _targetPaths
Field Value
EdgePath<T>[]

_weightHandler

Declaration
protected readonly WeightHandler<T> _weightHandler
Field Value
WeightHandler<T>

_weights

Declaration
protected T[][] _weights
Field Value
T[][]

Properties

Errors

Returns the errors indexed per original routerpoint index.

Declaration
public Dictionary<int, RouterPointError> Errors { get; }
Property Value
Dictionary<System.Int32, RouterPointError>

Implements
IDirectedWeightMatrixAlgorithm<T>.Errors

MassResolver

Gets the mass resolver.

Declaration
public IMassResolvingAlgorithm MassResolver { get; }
Property Value
IMassResolvingAlgorithm

Implements
IDirectedWeightMatrixAlgorithm<T>.MassResolver

Profile

Gets the profile.

Declaration
public IProfileInstance Profile { get; }
Property Value
IProfileInstance

Implements
IDirectedWeightMatrixAlgorithm<T>.Profile

Router

Gets the router.

Declaration
public RouterBase Router { get; }
Property Value
RouterBase

Implements
IDirectedWeightMatrixAlgorithm<T>.Router

RouterPoints

Gets the valid router points.

Declaration
public List<RouterPoint> RouterPoints { get; }
Property Value
List<RouterPoint>

Implements
IDirectedWeightMatrixAlgorithm<T>.RouterPoints

SourcePaths

Gets the source paths.

Declaration
public EdgePath<T>[] SourcePaths { get; }
Property Value
EdgePath<T>[]

Implements
IDirectedWeightMatrixAlgorithm<T>.SourcePaths

TargetPaths

Gets the target paths.

Declaration
public EdgePath<T>[] TargetPaths { get; }
Property Value
EdgePath<T>[]

Implements
IDirectedWeightMatrixAlgorithm<T>.TargetPaths

Weights

Gets the weights between all valid router points.

Declaration
public T[][] Weights { get; }
Property Value
T[][]

Implements
IDirectedWeightMatrixAlgorithm<T>.Weights

Methods

BackwardVertexFound(Int32, UInt32, LinkedEdgePath<T>)

Called when a backward vertex was found.

Declaration
protected virtual bool BackwardVertexFound(int i, uint vertex, LinkedEdgePath<T> backwardVisit)
Parameters
System.Int32 i

System.UInt32 vertex

LinkedEdgePath<T> backwardVisit

Returns
System.Boolean

CorrectedIndexOf(Int32)

Returns the corrected index of the routerpoint, given the original index.

Declaration
public int CorrectedIndexOf(int originalIdx)
Parameters
System.Int32 originalIdx

Returns
System.Int32

Implements
IDirectedWeightMatrixAlgorithm<T>.CorrectedIndexOf(Int32)

DoRun(CancellationToken)

Executes the algorithm.

Declaration
protected override sealed void DoRun(CancellationToken cancellationToken)
Parameters
CancellationToken cancellationToken

Overrides
AlgorithmBase.DoRun(CancellationToken)

ForwardVertexFound(Int32, UInt32, LinkedEdgePath<T>)

Called when a forward vertex was found.

Declaration
protected bool ForwardVertexFound(int i, uint vertex, LinkedEdgePath<T> visit)
Parameters
System.Int32 i

System.UInt32 vertex

LinkedEdgePath<T> visit

Returns
System.Boolean

OriginalIndexOf(Int32)

Returns the original index of the routerpoint, given the corrected index.

Declaration
public int OriginalIndexOf(int correctedIdx)
Parameters
System.Int32 correctedIdx

Returns
System.Int32

Implements
IDirectedWeightMatrixAlgorithm<T>.OriginalIndexOf(Int32)
Back to top Built by Itinero, MIT licensed.