GH_IndexRuleSet

public class GH_IndexRuleSet
A collection of index rules.

Constructors

GH_IndexRuleSet

#
public GH_IndexRuleSet()
Blank constructor. Creates an empty collection of rules.

Properties

Count

#
public int Count { get; }
Gets the number of rules defined in this collection.

Indexers

Rule

#
public IGH_IndexRule this[int index] { get; }
Gets the rule at the specified index.
index (int)

Methods

AddAnyDigitRule

#
public void AddAnyDigitRule()
Append a rule for any single digit.

AddAnyDigitsRule

#
public void AddAnyDigitsRule()
Append a rule for any amount of digits.

AddDigitPatternRule

#
public void AddDigitPatternRule(int firstDigit, int nextDigit, int lastDigit)
Append a rule for filtering digit patterns.
firstDigit (int)First digit in pattern.
nextDigit (int)Next digit in pattern.
lastDigit (int)Last digit in pattern.

AddDigitPatternRule

#
public void AddDigitPatternRule(int firstDigit, int nextDigit)
Append a rule for filtering digit patterns. This pattern does not have an upper bound.
firstDigit (int)First digit in pattern.
nextDigit (int)Next digit in pattern.

AddDigitPatternRule

#
public void AddDigitPatternRule(int[] pattern)
Append a rule for filtering digit patterns.
pattern (int[])Complete pattern. A complete pattern consists of at least three integers, the first one signifying the pattern lower bound, the last one signifying the patters upper bound (use Int32.MaxValue is you do not want to enforce an upper bound), and at least one integer in between defining the pattern growth.

AddDigitRule

#
public void AddDigitRule(int digit, bool invert)
Append a single digit rule.
digit (int)Digit to filter.
invert (bool)If true, the digit will be filtered against rather than for.

AddRangePatternRule

#
public void AddRangePatternRule(GH_IndexRange[] pattern)
Append a rule for filtering range patterns.
pattern (GH_IndexRange[])Complete pattern. A complete pattern consists of at least three ranges, the first one signifying the pattern lower bound, the last one signifying the patters upper bound (use GH_IndexRange.MaxValue is you do not want to enforce an upper bound), and at least one range in between defining the pattern growth.

AddRangeRule

#
public void AddRangeRule(GH_IndexRange range, bool invert)
Append a single range rule.
range (GH_IndexRange)Range to filter.
invert (bool)If true, the range will be filtered against rather than for.

Evaluate

#
public GH_RuleResult Evaluate(int index)
Evaluate the index given the local rules.
index (int)Index to evaluate.
The result of the evaluation.