Show / Hide Table of Contents

Class WeightHandler

A weight handler.

Inheritance
System.Object
WeightHandler<Weight>
WeightHandler
Inherited Members
WeightHandler<Weight>.GetEdgeWeight(Graph.EdgeEnumerator)
WeightHandler<Weight>.GetEdgeWeight(Edge)
WeightHandler<Weight>.GetEdgeWeight(RoutingEdge)
WeightHandler<Weight>.AddPathTree(PathTree, UInt32, WeightAndDir<Weight>, UInt32)
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 sealed class WeightHandler : WeightHandler<Weight>

Constructors

WeightHandler(Func<UInt16, FactorAndSpeed>)

Creates a new weight handler.

Declaration
public WeightHandler(Func<ushort, FactorAndSpeed> getFactorAndSpeed)
Parameters
Func<System.UInt16, FactorAndSpeed> getFactorAndSpeed

Properties

DynamicSize

Gets the size of the fixed parth in a dynamic directed graph when using this weight.

Declaration
public override sealed int DynamicSize { get; }
Property Value
System.Int32

Overrides
Itinero.Algorithms.Weights.WeightHandler<Itinero.Algorithms.Weights.Weight>.DynamicSize

Infinite

Returns the weight that represents 'infinite'.

Declaration
public override sealed Weight Infinite { get; }
Property Value
Weight

Overrides
Itinero.Algorithms.Weights.WeightHandler<Itinero.Algorithms.Weights.Weight>.Infinite

MetaSize

Gets the size of the meta-data in a directed meta graph when using this weight.

Declaration
public override sealed int MetaSize { get; }
Property Value
System.Int32

Overrides
Itinero.Algorithms.Weights.WeightHandler<Itinero.Algorithms.Weights.Weight>.MetaSize

Zero

Returns the weight that represents 'zero'.

Declaration
public override sealed Weight Zero { get; }
Property Value
Weight

Overrides
Itinero.Algorithms.Weights.WeightHandler<Itinero.Algorithms.Weights.Weight>.Zero

Methods

Add(Weight, Weight)

Adds the two weights.

Declaration
public override sealed Weight Add(Weight weight1, Weight weight2)
Parameters
Weight weight1

Weight weight2

Returns
Weight

Overrides
Itinero.Algorithms.Weights.WeightHandler<Itinero.Algorithms.Weights.Weight>.Add(Itinero.Algorithms.Weights.Weight, Itinero.Algorithms.Weights.Weight)

Add(Weight, UInt16, Single, out Factor)

Adds to the given weight based on the given edge profile and distance.

Declaration
public override sealed Weight Add(Weight weight, ushort edgeProfile, float distance, out Factor factor)
Parameters
Weight weight

System.UInt16 edgeProfile

System.Single distance

Factor factor

Returns
Weight

Overrides
Itinero.Algorithms.Weights.WeightHandler<Itinero.Algorithms.Weights.Weight>.Add(Itinero.Algorithms.Weights.Weight, System.UInt16, System.Single, Factor)

AddEdge(DirectedDynamicGraph, UInt32, UInt32, Nullable<Boolean>, Weight)

Adds a new edge to a graph with the given direction and weight.

Declaration
public override sealed void AddEdge(DirectedDynamicGraph graph, uint vertex1, uint vertex2, bool ? direction, Weight weight)
Parameters
DirectedDynamicGraph graph

System.UInt32 vertex1

System.UInt32 vertex2

System.Nullable<System.Boolean> direction

Weight weight

Overrides
Itinero.Algorithms.Weights.WeightHandler<Itinero.Algorithms.Weights.Weight>.AddEdge(DirectedDynamicGraph, System.UInt32, System.UInt32, System.Nullable<System.Boolean>, Itinero.Algorithms.Weights.Weight)

AddEdge(DirectedMetaGraph, UInt32, UInt32, UInt32, Nullable<Boolean>, Weight)

Adds a new edge to a graph with the given direction and weight.

Declaration
public override sealed void AddEdge(DirectedMetaGraph graph, uint vertex1, uint vertex2, uint contractedId, bool ? direction, Weight weight)
Parameters
DirectedMetaGraph graph

System.UInt32 vertex1

System.UInt32 vertex2

System.UInt32 contractedId

System.Nullable<System.Boolean> direction

Weight weight

Overrides
Itinero.Algorithms.Weights.WeightHandler<Itinero.Algorithms.Weights.Weight>.AddEdge(DirectedMetaGraph, System.UInt32, System.UInt32, System.UInt32, System.Nullable<System.Boolean>, Itinero.Algorithms.Weights.Weight)

AddOrUpdateEdge(DirectedDynamicGraph, UInt32, UInt32, UInt32, Nullable<Boolean>, Weight, UInt32[], UInt32[])

Adds or updates and edge.

Declaration
public override void AddOrUpdateEdge(DirectedDynamicGraph graph, uint vertex1, uint vertex2, uint contractedId, bool ? direction, Weight weight, uint[] s1, uint[] s2)
Parameters
DirectedDynamicGraph graph

System.UInt32 vertex1

System.UInt32 vertex2

System.UInt32 contractedId

System.Nullable<System.Boolean> direction

Weight weight

System.UInt32[] s1

System.UInt32[] s2

Overrides
Itinero.Algorithms.Weights.WeightHandler<Itinero.Algorithms.Weights.Weight>.AddOrUpdateEdge(DirectedDynamicGraph, System.UInt32, System.UInt32, System.UInt32, System.Nullable<System.Boolean>, Itinero.Algorithms.Weights.Weight, System.UInt32[], System.UInt32[])

AddOrUpdateEdge(DirectedMetaGraph, UInt32, UInt32, UInt32, Nullable<Boolean>, Weight)

Adds or updates and edge.

Declaration
public override void AddOrUpdateEdge(DirectedMetaGraph graph, uint vertex1, uint vertex2, uint contractedId, bool ? direction, Weight weight)
Parameters
DirectedMetaGraph graph

System.UInt32 vertex1

System.UInt32 vertex2

System.UInt32 contractedId

System.Nullable<System.Boolean> direction

Weight weight

Overrides
Itinero.Algorithms.Weights.WeightHandler<Itinero.Algorithms.Weights.Weight>.AddOrUpdateEdge(DirectedMetaGraph, System.UInt32, System.UInt32, System.UInt32, System.Nullable<System.Boolean>, Itinero.Algorithms.Weights.Weight)

AddPathTree(PathTree, UInt32, Weight, UInt32)

Adds the given vertex and weight to the path tree.

Declaration
public override sealed uint AddPathTree(PathTree tree, uint vertex, Weight weight, uint previous)
Parameters
PathTree tree

System.UInt32 vertex

Weight weight

System.UInt32 previous

Returns
System.UInt32

Overrides
Itinero.Algorithms.Weights.WeightHandler<Itinero.Algorithms.Weights.Weight>.AddPathTree(PathTree, System.UInt32, Itinero.Algorithms.Weights.Weight, System.UInt32)

Calculate(UInt16, Single, out Factor)

Calculates the weight for the given edge.

Declaration
public override sealed Weight Calculate(ushort edgeProfile, float distance, out Factor factor)
Parameters
System.UInt16 edgeProfile

System.Single distance

Factor factor

Returns
Weight

Overrides
Itinero.Algorithms.Weights.WeightHandler<Itinero.Algorithms.Weights.Weight>.Calculate(System.UInt16, System.Single, Factor)

CalculateWeightAndDir(UInt16, Single)

Calculates the weight and direction for the given edge profile.

Declaration
public override sealed WeightAndDir<Weight> CalculateWeightAndDir(ushort edgeProfile, float distance)
Parameters
System.UInt16 edgeProfile

System.Single distance

Returns
WeightAndDir<Weight>

Overrides
Itinero.Algorithms.Weights.WeightHandler<Itinero.Algorithms.Weights.Weight>.CalculateWeightAndDir(System.UInt16, System.Single)

CalculateWeightAndDir(UInt16, Single, out Boolean)

Calculates the weight and direction for the given edge profile.

Declaration
public override sealed WeightAndDir<Weight> CalculateWeightAndDir(ushort edgeProfile, float distance, out bool accessible)
Parameters
System.UInt16 edgeProfile

System.Single distance

System.Boolean accessible

Returns
WeightAndDir<Weight>

Overrides
Itinero.Algorithms.Weights.WeightHandler<Itinero.Algorithms.Weights.Weight>.CalculateWeightAndDir(System.UInt16, System.Single, System.Boolean)

CanUse(ContractedDb)

Returns true if the given contracted db can be used.

Declaration
public override sealed bool CanUse(ContractedDb db)
Parameters
ContractedDb db

Returns
System.Boolean

Overrides
Itinero.Algorithms.Weights.WeightHandler<Itinero.Algorithms.Weights.Weight>.CanUse(ContractedDb)

GetEdgeWeight(DirectedDynamicGraph.EdgeEnumerator, out Nullable<Boolean>)

Gets the weight from the given edge and sets the direction.

Declaration
public override sealed Weight GetEdgeWeight(DirectedDynamicGraph.EdgeEnumerator edge, out bool ? direction)
Parameters
DirectedDynamicGraph.EdgeEnumerator edge

System.Nullable<System.Boolean> direction

Returns
Weight

Overrides
Itinero.Algorithms.Weights.WeightHandler<Itinero.Algorithms.Weights.Weight>.GetEdgeWeight(DirectedDynamicGraph.EdgeEnumerator, System.Nullable<System.Boolean>)

GetEdgeWeight(DirectedMetaGraph.EdgeEnumerator)

Gets the weight from the given edge and sets the direction.

Declaration
public override sealed WeightAndDir<Weight> GetEdgeWeight(DirectedMetaGraph.EdgeEnumerator edge)
Parameters
DirectedMetaGraph.EdgeEnumerator edge

Returns
WeightAndDir<Weight>

Overrides
Itinero.Algorithms.Weights.WeightHandler<Itinero.Algorithms.Weights.Weight>.GetEdgeWeight(DirectedMetaGraph.EdgeEnumerator)

GetEdgeWeight(DirectedMetaGraph.EdgeEnumerator, out Nullable<Boolean>)

Gets the weight from the given edge and sets the direction.

Declaration
public override sealed Weight GetEdgeWeight(DirectedMetaGraph.EdgeEnumerator edge, out bool ? direction)
Parameters
DirectedMetaGraph.EdgeEnumerator edge

System.Nullable<System.Boolean> direction

Returns
Weight

Overrides
Itinero.Algorithms.Weights.WeightHandler<Itinero.Algorithms.Weights.Weight>.GetEdgeWeight(DirectedMetaGraph.EdgeEnumerator, System.Nullable<System.Boolean>)

GetEdgeWeight(DynamicEdge, out Nullable<Boolean>)

Gets the weight from the given edge and sets the direction.

Declaration
public override sealed Weight GetEdgeWeight(DynamicEdge edge, out bool ? direction)
Parameters
DynamicEdge edge

System.Nullable<System.Boolean> direction

Returns
Weight

Overrides
Itinero.Algorithms.Weights.WeightHandler<Itinero.Algorithms.Weights.Weight>.GetEdgeWeight(DynamicEdge, System.Nullable<System.Boolean>)

GetEdgeWeight(MetaEdge)

Gets the weight from the given edge and sets the direction.

Declaration
public override sealed WeightAndDir<Weight> GetEdgeWeight(MetaEdge edge)
Parameters
MetaEdge edge

Returns
WeightAndDir<Weight>

Overrides
Itinero.Algorithms.Weights.WeightHandler<Itinero.Algorithms.Weights.Weight>.GetEdgeWeight(MetaEdge)

GetEdgeWeight(MetaEdge, out Nullable<Boolean>)

Gets the weight from the given edge and sets the direction.

Declaration
public override sealed Weight GetEdgeWeight(MetaEdge edge, out bool ? direction)
Parameters
MetaEdge edge

System.Nullable<System.Boolean> direction

Returns
Weight

Overrides
Itinero.Algorithms.Weights.WeightHandler<Itinero.Algorithms.Weights.Weight>.GetEdgeWeight(MetaEdge, System.Nullable<System.Boolean>)

GetMetric(Weight)

Gets the metric for the given weight.

Declaration
public override sealed float GetMetric(Weight weight)
Parameters
Weight weight

Returns
System.Single

Overrides
Itinero.Algorithms.Weights.WeightHandler<Itinero.Algorithms.Weights.Weight>.GetMetric(Itinero.Algorithms.Weights.Weight)

GetPathTree(PathTree, UInt32, out UInt32, out Weight, out UInt32)

Gets the path tree.

Declaration
public override sealed void GetPathTree(PathTree tree, uint pointer, out uint vertex, out Weight weight, out uint previous)
Parameters
PathTree tree

System.UInt32 pointer

System.UInt32 vertex

Weight weight

System.UInt32 previous

Overrides
Itinero.Algorithms.Weights.WeightHandler<Itinero.Algorithms.Weights.Weight>.GetPathTree(PathTree, System.UInt32, System.UInt32, Itinero.Algorithms.Weights.Weight, System.UInt32)

IsSmallerThanAny(Weight, Weight)

Returns true if the given weight is smaller than all of fields in max.-

Declaration
public override sealed bool IsSmallerThanAny(Weight weight, Weight max)
Parameters
Weight weight

Weight max

Returns
System.Boolean

Overrides
Itinero.Algorithms.Weights.WeightHandler<Itinero.Algorithms.Weights.Weight>.IsSmallerThanAny(Itinero.Algorithms.Weights.Weight, Itinero.Algorithms.Weights.Weight)

Subtract(Weight, Weight)

Subtracts the given weights.

Declaration
public override sealed Weight Subtract(Weight weight1, Weight weight2)
Parameters
Weight weight1

Weight weight2

Returns
Weight

Overrides
Itinero.Algorithms.Weights.WeightHandler<Itinero.Algorithms.Weights.Weight>.Subtract(Itinero.Algorithms.Weights.Weight, Itinero.Algorithms.Weights.Weight)
Back to top Built by Itinero, MIT licensed.