Class DefaultWeightHandler
A default weight handler.
Inherited Members
Namespace: System.Dynamic.ExpandoObject
Assembly: cs.temp.dll.dll
Syntax
public sealed class DefaultWeightHandler : WeightHandler<float>
Properties
Infinity
Gets the weight that represents infinity.
Declaration
public override float Infinity { get; }
Property Value
|
System.Single
|
Overrides
Itinero.Optimization.Weights.WeightHandler<System.Single>.Infinity
Zero
Gets the weight that represents zero.
Declaration
public override float Zero { get; }
Property Value
|
System.Single
|
Overrides
Itinero.Optimization.Weights.WeightHandler<System.Single>.Zero
Methods
Add(Single, Single)
Adds weight1 and weight2.
Declaration
public override float Add(float weight1, float weight2)
Parameters
|
System.Single
weight1
|
|
System.Single
weight2
|
Returns
|
System.Single
|
Overrides
Itinero.Optimization.Weights.WeightHandler<System.Single>.Add(System.Single, System.Single)
Compare(Single, Single)
Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.
Declaration
public override int Compare(float x, float y)
Parameters
|
System.Single
x
|
|
System.Single
y
|
Returns
|
System.Int32
|
Overrides
Itinero.Optimization.Weights.WeightHandler<System.Single>.Compare(System.Single, System.Single)
Divide(Single, Single)
Divides the given weight by the given divider.
Declaration
public override float Divide(float weight, float divider)
Parameters
|
System.Single
weight
|
|
System.Single
divider
|
Returns
|
System.Single
|
Overrides
Itinero.Optimization.Weights.WeightHandler<System.Single>.Divide(System.Single, System.Single)
IsLargerThanAny(Single, Single)
Returns true if the given weight is bigger in any of it's fields compared to the other weight.
Declaration
public override bool IsLargerThanAny(float weight, float other)
Parameters
|
System.Single
weight
|
|
System.Single
other
|
Returns
|
System.Boolean
|
Overrides
Itinero.Optimization.Weights.WeightHandler<System.Single>.IsLargerThanAny(System.Single, System.Single)
Multiply(Single, Single)
Multiplies the given weight with the given factor.
Declaration
public override float Multiply(float weight, float factor)
Parameters
|
System.Single
weight
|
|
System.Single
factor
|
Returns
|
System.Single
|
Overrides
Itinero.Optimization.Weights.WeightHandler<System.Single>.Multiply(System.Single, System.Single)
Subtract(Single, Single)
Subtracts weight2 from weight1.
Declaration
public override float Subtract(float weight1, float weight2)
Parameters
|
System.Single
weight1
|
|
System.Single
weight2
|
Returns
|
System.Single
|
Overrides
Itinero.Optimization.Weights.WeightHandler<System.Single>.Subtract(System.Single, System.Single)