Table of Contents

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

IndexCalculationScheme

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

IndexCalculationScheme

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

IndexCalculationScheme

Methods

CalculateIndex(RuleApplication)

Calculates the collection index for the given rule application

public abstract int CalculateIndex(RuleApplication ruleApplication)

Parameters

ruleApplication RuleApplication

the 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

maxDepth int

the maximum depth of parse expressions to look at

Returns

IndexCalculationScheme

An index calculation scheme with the desired max depth