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

Special automata operations. @lucene.experimental
Exibir arquivo Open project: apache/lucenenet Class Usage Examples

Public Methods

Method 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

Method 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 method

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
return string

GetCommonPrefixBytesRef() public static method

public static GetCommonPrefixBytesRef ( Automaton a ) : BytesRef
a Automaton
return BytesRef

GetCommonSuffix() public static method

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
return string

GetCommonSuffixBytesRef() public static method

public static GetCommonSuffixBytesRef ( Automaton a ) : BytesRef
a Automaton
return BytesRef

GetFiniteStrings() public static method

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
return ISet

IsFinite() public static method

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

Reverse() public static method

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
return ISet