Class Extensions
Contains extension methods related to weights and weight handlers.
Inheritance
Inherited Members
Namespace: System.Dynamic.ExpandoObject
Assembly: cs.temp.dll.dll
Syntax
public static class Extensions
Methods
AugmentedWeightHandler(IProfileInstance, RouterBase)
Returns the augmented weight handler.
Declaration
public static WeightHandler AugmentedWeightHandler(this IProfileInstance profile, RouterBase router)
Parameters
|
IProfileInstance
profile
|
|
RouterBase
router
|
Returns
|
WeightHandler
|
AugmentedWeightHandlerCached(IProfileInstance, RouterDb)
Returns the augmented weight handler.
Declaration
public static WeightHandler AugmentedWeightHandlerCached(this IProfileInstance profile, RouterDb routerDb)
Parameters
|
IProfileInstance
profile
|
|
RouterDb
routerDb
|
Returns
|
WeightHandler
|
Calculate<T>(WeightHandler<T>, UInt16, Single)
Calculates the weight for the given edge and distance.
Declaration
public static T Calculate<T>(this WeightHandler<T> handler, ushort edgeProfile, float distance)where T : struct
Parameters
|
WeightHandler<T>
handler
|
|
System.UInt16
edgeProfile
|
|
System.Single
distance
|
Returns
|
T
|
Type Parameters
|
T
|
CheckCanUse<T>(WeightHandler<T>, ContractedDb)
Checks if the given graph can be used with the weight handler.
Declaration
public static void CheckCanUse<T>(this WeightHandler<T> weightHandler, ContractedDb contractedDb)where T : struct
Parameters
|
WeightHandler<T>
weightHandler
|
|
ContractedDb
contractedDb
|
Type Parameters
|
T
|
CheckCanUse<T>(WeightHandler<T>, DirectedDynamicGraph)
Checks if the given graph can be used with the weight handler.
Declaration
public static void CheckCanUse<T>(this WeightHandler<T> weightHandler, DirectedDynamicGraph graph)where T : struct
Parameters
|
WeightHandler<T>
weightHandler
|
|
DirectedDynamicGraph
graph
|
Type Parameters
|
T
|
CheckCanUse<T>(WeightHandler<T>, DirectedMetaGraph)
Checks if the given graph can be used with the weight handler.
Declaration
public static void CheckCanUse<T>(this WeightHandler<T> weightHandler, DirectedMetaGraph graph)where T : struct
Parameters
|
WeightHandler<T>
weightHandler
|
|
DirectedMetaGraph
graph
|
Type Parameters
|
T
|
DefaultWeightHandler(IProfileInstance, RouterBase)
Returns the default weight handler.
Declaration
public static DefaultWeightHandler DefaultWeightHandler(this IProfileInstance profile, RouterBase router)
Parameters
|
IProfileInstance
profile
|
|
RouterBase
router
|
Returns
|
DefaultWeightHandler
|
DefaultWeightHandlerCached(IProfileInstance, RouterDb)
Returns the default weight handler but calculates a profile cache first.
Declaration
public static DefaultWeightHandler DefaultWeightHandlerCached(this IProfileInstance profile, RouterDb routerDb)
Parameters
|
IProfileInstance
profile
|
|
RouterDb
routerDb
|
Returns
|
DefaultWeightHandler
|
GetPath<T>(WeightHandler<T>, PathTree, UInt32)
Returns an edge path for the path represented by the given pointer.
Declaration
public static EdgePath<T> GetPath<T>(this WeightHandler<T> weightHandler, PathTree pathTree, uint pointer)where T : struct
Parameters
|
WeightHandler<T>
weightHandler
|
|
PathTree
pathTree
|
|
System.UInt32
pointer
|
Returns
|
EdgePath<T>
|
Type Parameters
|
T
|
IsLargerThan<T>(WeightHandler<T>, T, T)
Returns true if weigh1 > weight2 according to the weight handler.
Declaration
public static bool IsLargerThan<T>(this WeightHandler<T> handler, T weight1, T weight2)where T : struct
Parameters
|
WeightHandler<T>
handler
|
|
T
weight1
|
|
T
weight2
|
Returns
|
System.Boolean
|
Type Parameters
|
T
|
IsLargerThanOrEqual<T>(WeightHandler<T>, T, T)
Returns true if weigh1 > weight2 according to the weight handler.
Declaration
public static bool IsLargerThanOrEqual<T>(this WeightHandler<T> handler, T weight1, T weight2)where T : struct
Parameters
|
WeightHandler<T>
handler
|
|
T
weight1
|
|
T
weight2
|
Returns
|
System.Boolean
|
Type Parameters
|
T
|
IsSmallerThan<T>(WeightHandler<T>, T, T)
Returns true if weigh1 smaller than weight2 according to the weight handler.
Declaration
public static bool IsSmallerThan<T>(this WeightHandler<T> handler, T weight1, T weight2)where T : struct
Parameters
|
WeightHandler<T>
handler
|
|
T
weight1
|
|
T
weight2
|
Returns
|
System.Boolean
|
Type Parameters
|
T
|
IsSmallerThan<T>(WeightHandler<T>, T, Single)
Returns true if weigh1 smaller than metric according to the weight handler.
Declaration
public static bool IsSmallerThan<T>(this WeightHandler<T> handler, T weight1, float metric)where T : struct
Parameters
|
WeightHandler<T>
handler
|
|
T
weight1
|
|
System.Single
metric
|
Returns
|
System.Boolean
|
Type Parameters
|
T
|
IsSmallerThanOrEqual<T>(WeightHandler<T>, T, T)
Returns true if weigh1 smaller than weight2 according to the weight handler.
Declaration
public static bool IsSmallerThanOrEqual<T>(this WeightHandler<T> handler, T weight1, T weight2)where T : struct
Parameters
|
WeightHandler<T>
handler
|
|
T
weight1
|
|
T
weight2
|
Returns
|
System.Boolean
|
Type Parameters
|
T
|