Show / Hide Table of Contents

Class WeightMatrixAlgorithm<T>

An algorithm to calculate a weight-matrix for a set of locations.

Inheritance
System.Object
AlgorithmBase
WeightMatrixAlgorithm<T>
WeightMatrixAlgorithm
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 WeightMatrixAlgorithm<T> : AlgorithmBase, IWeightMatrixAlgorithm<T>, IAlgorithm where T : struct
Type Parameters
T

Constructors

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

Creates a new weight-matrix algorithm.

Declaration
public WeightMatrixAlgorithm(RouterBase router, IProfileInstance profile, WeightHandler<T> weightHandler, Coordinate[] locations)
Parameters
RouterBase router

IProfileInstance profile

WeightHandler<T> weightHandler

Coordinate[] locations

WeightMatrixAlgorithm(RouterBase, IProfileInstance, WeightHandler<T>, IMassResolvingAlgorithm)

Creates a new weight-matrix algorithm.

Declaration
public WeightMatrixAlgorithm(RouterBase router, IProfileInstance profile, WeightHandler<T> weightHandler, IMassResolvingAlgorithm massResolver)
Parameters
RouterBase router

IProfileInstance profile

WeightHandler<T> weightHandler

IMassResolvingAlgorithm massResolver

WeightMatrixAlgorithm(RouterBase, IProfileInstance, WeightHandler<T>, List<RouterPoint>)

Creates a new weight-matrix algorithm.

Declaration
public WeightMatrixAlgorithm(RouterBase router, IProfileInstance profile, WeightHandler<T> weightHandler, List<RouterPoint> resolvedLocations)
Parameters
RouterBase router

IProfileInstance profile

WeightHandler<T> weightHandler

List<RouterPoint> resolvedLocations

Properties

Errors

Returns the errors indexed per original routerpoint index.

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

Implements
IWeightMatrixAlgorithm<T>.Errors

MassResolver

Gets the mass resolver.

Declaration
public IMassResolvingAlgorithm MassResolver { get; }
Property Value
IMassResolvingAlgorithm

Implements
IWeightMatrixAlgorithm<T>.MassResolver

Profile

Gets the profile.

Declaration
public IProfileInstance Profile { get; }
Property Value
IProfileInstance

Implements
IWeightMatrixAlgorithm<T>.Profile

Router

Gets the router.

Declaration
public RouterBase Router { get; }
Property Value
RouterBase

Implements
IWeightMatrixAlgorithm<T>.Router

RouterPoints

Gets the valid router points.

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

Implements
IWeightMatrixAlgorithm<T>.RouterPoints

Weights

Gets the weights between all valid router points.

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

Implements
IWeightMatrixAlgorithm<T>.Weights

Methods

CorrectedIndexOf(Int32)

Returns the corrected index, or the index in the weight matrix for the given routerpoint index.

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

The index of the resolved point.

Returns
System.Int32

The index in the weight matrix, -1 if this point is in error.

Implements
IWeightMatrixAlgorithm<T>.CorrectedIndexOf(Int32)

DoRun(CancellationToken)

Executes the algorithm.

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

Overrides
AlgorithmBase.DoRun(CancellationToken)

OriginalIndexOf(Int32)

Returns the routerpoint index that represents the given weight in the weight matrix.

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

The index in the weight matrix.

Returns
System.Int32

The routerpoint index, always exists and always returns a proper value.

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