C# Class Lucene.Net.Util.Automaton.SpecialOperations

Special automata operations. @lucene.experimental
Afficher le fichier Open project: apache/lucenenet Class Usage Examples

Méthodes publiques

Méthode Description
GetCommonPrefix ( Automaton a ) : string

Returns the longest string that is a prefix of all accepted strings and visits each state at most once.

GetCommonPrefixBytesRef ( Automaton a ) : BytesRef
GetCommonSuffix ( Automaton a ) : string

Returns the longest string that is a suffix of all accepted strings and visits each state at most once.

GetCommonSuffixBytesRef ( Automaton a ) : BytesRef
GetFiniteStrings ( Automaton a, int limit ) : ISet

Returns the set of accepted strings, assuming that at most limit strings are accepted. If more than limit strings are accepted, the first limit strings found are returned. If limit<0, then the limit is infinite.

IsFinite ( Automaton a ) : bool

Returns true if the language of this automaton is finite.

Reverse ( Automaton a ) : ISet

Reverses the language of the given (non-singleton) automaton while returning the set of new initial states.

Private Methods

Méthode Description
FindIndex ( int c, int points ) : int

Finds the largest entry whose value is less than or equal to c, or 0 if there is no such entry.

GetFiniteStrings ( State s, HashSet pathstates, HashSet strings, IntsRef path, int limit ) : bool

Returns the strings that can be produced from the given state, or false if more than limit strings are found. limit<0 means "infinite".

IsFinite ( State s, BitArray path, BitArray visited ) : bool

Checks whether there is a loop containing s. (this is sufficient since there are never transitions to dead states.)

ReverseBytes ( BytesRef @ref ) : void
SpecialOperations ( ) : System

Method Details

GetCommonPrefix() public static méthode

Returns the longest string that is a prefix of all accepted strings and visits each state at most once.
public static GetCommonPrefix ( Automaton a ) : string
a Automaton
Résultat string

GetCommonPrefixBytesRef() public static méthode

public static GetCommonPrefixBytesRef ( Automaton a ) : BytesRef
a Automaton
Résultat BytesRef

GetCommonSuffix() public static méthode

Returns the longest string that is a suffix of all accepted strings and visits each state at most once.
public static GetCommonSuffix ( Automaton a ) : string
a Automaton
Résultat string

GetCommonSuffixBytesRef() public static méthode

public static GetCommonSuffixBytesRef ( Automaton a ) : BytesRef
a Automaton
Résultat BytesRef

GetFiniteStrings() public static méthode

Returns the set of accepted strings, assuming that at most limit strings are accepted. If more than limit strings are accepted, the first limit strings found are returned. If limit<0, then the limit is infinite.
public static GetFiniteStrings ( Automaton a, int limit ) : ISet
a Automaton
limit int
Résultat ISet

IsFinite() public static méthode

Returns true if the language of this automaton is finite.
public static IsFinite ( Automaton a ) : bool
a Automaton
Résultat bool

Reverse() public static méthode

Reverses the language of the given (non-singleton) automaton while returning the set of new initial states.
public static Reverse ( Automaton a ) : ISet
a Automaton
Résultat ISet