Class DirectedWeightMatrixAlgorithm<T>
An algorithm to calculate a turn-aware weight matrix.
Inherited Members
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
_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
_sourcePaths
_targetPaths
_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
MassResolver
Gets the mass resolver.
Declaration
public IMassResolvingAlgorithm MassResolver { get; }
Property Value
IMassResolvingAlgorithm
|
Implements
Profile
Gets the profile.
Declaration
public IProfileInstance Profile { get; }
Property Value
IProfileInstance
|
Implements
Router
RouterPoints
Gets the valid router points.
Declaration
public List<RouterPoint> RouterPoints { get; }
Property Value
List<RouterPoint>
|
Implements
SourcePaths
Gets the source paths.
Declaration
public EdgePath<T>[] SourcePaths { get; }
Property Value
EdgePath<T>[]
|
Implements
TargetPaths
Gets the target paths.
Declaration
public EdgePath<T>[] TargetPaths { get; }
Property Value
EdgePath<T>[]
|
Implements
Weights
Gets the weights between all valid router points.
Declaration
public T[][] Weights { get; }
Property Value
T[][]
|
Implements
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
DoRun(CancellationToken)
Executes the algorithm.
Declaration
protected override sealed void DoRun(CancellationToken cancellationToken)
Parameters
CancellationToken
cancellationToken
|
Overrides
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
|