Class WeightModifier
Object that lets you apply an edge weight factor to edges that meet a Condition filter function. If an edge meets the condition of several WeightModifier objects they will be grouped by group name and factor aggregator function will be applied to WeightModifiers SetWeightModifiersGroupAggregator(String, Func<Double, Double, Double>). By default - the lowest factor of group is chosen. Factors of all groups will be multiplied.
Inheritance
System.Object
WeightModifier
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Elements.Spatial.AdaptiveGrid
Assembly: Hypar.Elements.dll
Syntax
public class WeightModifier
Constructors
WeightModifier(String, Func<Vertex, Vertex, Boolean>, Double, String)
Basic constructor for a WeightModifier
Declaration
public WeightModifier(string name, Func<Vertex, Vertex, bool> condition, double factor, string group = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of the modifier. |
System.Func<Vertex, Vertex, System.Boolean> | condition | Filter function. |
System.Double | factor | Weight to be applied. |
System.String | group | Group name of the modifier. |
Fields
Condition
Filter function that determines if this WeightModifier applies to an edge.
Declaration
public Func<Vertex, Vertex, bool> Condition
Field Value
Type | Description |
---|---|
System.Func<Vertex, Vertex, System.Boolean> |
Factor
Weight to be applied according to this WeightModifier.
Declaration
public double Factor
Field Value
Type | Description |
---|---|
System.Double |
Group
Group name of the modifier.
Declaration
public readonly string Group
Field Value
Type | Description |
---|---|
System.String |
Name
WeightModifier name.
Declaration
public readonly string Name
Field Value
Type | Description |
---|---|
System.String |