Class IndexCalculationScheme
- Namespace
- NMF.AnyText.IndexCalculation
- Assembly
- NMF.AnyText.Core.dll
Denotes an abstract base class to define a schema how to calculate a collection index
public abstract class IndexCalculationScheme
- Inheritance
-
IndexCalculationScheme
- Inherited Members
Fields
Detailed
Denotes an index calculation scheme that iterates the closest star rule application, respecting the rule stack
public static readonly IndexCalculationScheme Detailed
Field Value
Heterogeneous
Denotes an index calculation scheme that iterates all rule applications from the parent definition in a depth-first-search
public static readonly IndexCalculationScheme Heterogeneous
Field Value
Simple
Denotes an index calculation scheme that simply looks up the index in the closest star rule application
public static readonly IndexCalculationScheme Simple
Field Value
Methods
CalculateIndex(RuleApplication)
Calculates the collection index for the given rule application
public abstract int CalculateIndex(RuleApplication ruleApplication)
Parameters
ruleApplicationRuleApplicationthe rule application
Returns
- int
the index in the parent collection or -1, if no such index can be calculated
HeterogeneousWithMaxDepth(int)
Denotes an index calculation scheme that iterates all rule applications from the parent definition in a depth-first-search
public static IndexCalculationScheme HeterogeneousWithMaxDepth(int maxDepth)
Parameters
maxDepthintthe maximum depth of parse expressions to look at
Returns
- IndexCalculationScheme
An index calculation scheme with the desired max depth