Show / Hide Table of Contents

Class WeightHandler<T>

An abstract weight handler class.

Inheritance
System.Object
WeightHandler<T>
DefaultWeightHandler
WeightHandler
Inherited Members
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 abstract class WeightHandler<T>
    where T : struct
Type Parameters
T

Properties

DynamicSize

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

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

Infinite

Returns the weight that represents 'infinite'.

Declaration
public abstract T Infinite { get; }
Property Value
T

MetaSize

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

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

Zero

Returns the weight that represents 'zero'.

Declaration
public abstract T Zero { get; }
Property Value
T

Methods

Add(T, T)

Adds the two weights.

Declaration
public abstract T Add(T weight1, T weight2)
Parameters
T weight1

T weight2

Returns
T

Add(T, UInt16, Single, out Factor)

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

Declaration
public abstract T Add(T weight, ushort edgeProfile, float distance, out Factor factor)
Parameters
T weight

System.UInt16 edgeProfile

System.Single distance

Factor factor

Returns
T

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

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

Declaration
public abstract void AddEdge(DirectedDynamicGraph graph, uint vertex1, uint vertex2, bool ? direction, T weight)
Parameters
DirectedDynamicGraph graph

System.UInt32 vertex1

System.UInt32 vertex2

System.Nullable<System.Boolean> direction

T weight

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

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

Declaration
public abstract void AddEdge(DirectedMetaGraph graph, uint vertex1, uint vertex2, uint contractedId, bool ? direction, T weight)
Parameters
DirectedMetaGraph graph

System.UInt32 vertex1

System.UInt32 vertex2

System.UInt32 contractedId

System.Nullable<System.Boolean> direction

T weight

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

Adds or updates an edge.

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

System.UInt32 vertex1

System.UInt32 vertex2

System.UInt32 contractedId

System.Nullable<System.Boolean> direction

T weight

System.UInt32[] s1

System.UInt32[] s2

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

Adds or updates an edge.

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

System.UInt32 vertex1

System.UInt32 vertex2

System.UInt32 contractedId

System.Nullable<System.Boolean> direction

T weight

AddPathTree(PathTree, UInt32, T, UInt32)

Adds a new vertex to the given path tree with the given weight and pointer.

Declaration
public abstract uint AddPathTree(PathTree tree, uint vertex, T weight, uint previous)
Parameters
PathTree tree

System.UInt32 vertex

T weight

System.UInt32 previous

Returns
System.UInt32

AddPathTree(PathTree, UInt32, WeightAndDir<T>, UInt32)

Adds a new vertex to the given path tree with the given weight and pointer.

Declaration
public uint AddPathTree(PathTree tree, uint vertex, WeightAndDir<T> weight, uint previous)
Parameters
PathTree tree

System.UInt32 vertex

WeightAndDir<T> weight

System.UInt32 previous

Returns
System.UInt32

Calculate(UInt16, Single, out Factor)

Calculates the weight for the given edge and returns the factor.

Declaration
public abstract T Calculate(ushort edgeProfile, float distance, out Factor factor)
Parameters
System.UInt16 edgeProfile

System.Single distance

Factor factor

Returns
T

CalculateWeightAndDir(UInt16, Single)

Calculates the weight and direction for the given edge profile.

Declaration
public abstract WeightAndDir<T> CalculateWeightAndDir(ushort edgeProfile, float distance)
Parameters
System.UInt16 edgeProfile

System.Single distance

Returns
WeightAndDir<T>

CalculateWeightAndDir(UInt16, Single, out Boolean)

Calculates the weight and direction for the given edge profile.

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

System.Single distance

System.Boolean accessible

Returns
WeightAndDir<T>

CanUse(ContractedDb)

Returns true if the given contracted db can be used.

Declaration
public abstract bool CanUse(ContractedDb db)
Parameters
ContractedDb db

Returns
System.Boolean

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

Gets the weight from a meta-edge.

Declaration
public abstract T GetEdgeWeight(DirectedDynamicGraph.EdgeEnumerator edge, out bool ? direction)
Parameters
DirectedDynamicGraph.EdgeEnumerator edge

System.Nullable<System.Boolean> direction

Returns
T

GetEdgeWeight(DirectedMetaGraph.EdgeEnumerator)

Gets the weight from a meta-edge.

Declaration
public abstract WeightAndDir<T> GetEdgeWeight(DirectedMetaGraph.EdgeEnumerator edge)
Parameters
DirectedMetaGraph.EdgeEnumerator edge

Returns
WeightAndDir<T>

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

Gets the weight from a meta-edge.

Declaration
public abstract T GetEdgeWeight(DirectedMetaGraph.EdgeEnumerator edge, out bool ? direction)
Parameters
DirectedMetaGraph.EdgeEnumerator edge

System.Nullable<System.Boolean> direction

Returns
T

GetEdgeWeight(DynamicEdge, out Nullable<Boolean>)

Gets the weight from a meta-edge.

Declaration
public abstract T GetEdgeWeight(DynamicEdge edge, out bool ? direction)
Parameters
DynamicEdge edge

System.Nullable<System.Boolean> direction

Returns
T

GetEdgeWeight(Edge)

Gets the weight and direction for the given edge.

Declaration
public WeightAndDir<T> GetEdgeWeight(Edge edge)
Parameters
Edge edge

Returns
WeightAndDir<T>

GetEdgeWeight(RoutingEdge)

Gets the weight and direction for the given edge.

Declaration
public WeightAndDir<T> GetEdgeWeight(RoutingEdge edge)
Parameters
RoutingEdge edge

Returns
WeightAndDir<T>

GetEdgeWeight(Graph.EdgeEnumerator)

Gets the weight and direction for the given edge.

Declaration
public WeightAndDir<T> GetEdgeWeight(Graph.EdgeEnumerator edge)
Parameters
Graph.EdgeEnumerator edge

Returns
WeightAndDir<T>

GetEdgeWeight(MetaEdge)

Gets the weight from a meta-edge.

Declaration
public abstract WeightAndDir<T> GetEdgeWeight(MetaEdge edge)
Parameters
MetaEdge edge

Returns
WeightAndDir<T>

GetEdgeWeight(MetaEdge, out Nullable<Boolean>)

Gets the weight from a meta-edge.

Declaration
public abstract T GetEdgeWeight(MetaEdge edge, out bool ? direction)
Parameters
MetaEdge edge

System.Nullable<System.Boolean> direction

Returns
T

GetMetric(T)

Gets the actual metric the algorithm should be using to determine shortest paths.

Declaration
public abstract float GetMetric(T weight)
Parameters
T weight

Returns
System.Single

GetPathTree(PathTree, UInt32, out UInt32, out T, out UInt32)

Gets a vertex from the given path tree using the given pointer.

Declaration
public abstract void GetPathTree(PathTree tree, uint pointer, out uint vertex, out T weight, out uint previous)
Parameters
PathTree tree

System.UInt32 pointer

System.UInt32 vertex

T weight

System.UInt32 previous

IsSmallerThanAny(T, T)

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

Declaration
public abstract bool IsSmallerThanAny(T weight, T max)
Parameters
T weight

T max

Returns
System.Boolean

Subtract(T, T)

Subtracts the two weights.

Declaration
public abstract T Subtract(T weight1, T weight2)
Parameters
T weight1

T weight2

Returns
T

Back to top Built by Itinero, MIT licensed.