Class BasicAutomata
Construction of basic automata.
Note
This API is experimental and might change in incompatible ways in the next release.
Inherited Members
Namespace: Lucene.Net.Util.Automaton
Assembly: Lucene.Net.dll
Syntax
public static class BasicAutomata
Methods
MakeAnyChar()
Returns a new (deterministic) automaton that accepts any single codepoint.
Declaration
public static Automaton MakeAnyChar()
Returns
Type | Description |
---|---|
Automaton |
MakeAnyString()
Returns a new (deterministic) automaton that accepts all strings.
Declaration
public static Automaton MakeAnyString()
Returns
Type | Description |
---|---|
Automaton |
MakeChar(int)
Returns a new (deterministic) automaton that accepts a single codepoint of the given value.
Declaration
public static Automaton MakeChar(int c)
Parameters
Type | Name | Description |
---|---|---|
int | c |
Returns
Type | Description |
---|---|
Automaton |
MakeCharRange(int, int)
Returns a new (deterministic) automaton that accepts a single codepoint whose value is in the given interval (including both end points).
Declaration
public static Automaton MakeCharRange(int min, int max)
Parameters
Type | Name | Description |
---|---|---|
int | min | |
int | max |
Returns
Type | Description |
---|---|
Automaton |
MakeEmpty()
Returns a new (deterministic) automaton with the empty language.
Declaration
public static Automaton MakeEmpty()
Returns
Type | Description |
---|---|
Automaton |
MakeEmptyString()
Returns a new (deterministic) automaton that accepts only the empty string.
Declaration
public static Automaton MakeEmptyString()
Returns
Type | Description |
---|---|
Automaton |
MakeInterval(int, int, int)
Returns a new automaton that accepts strings representing decimal non-negative integers in the given interval.
Declaration
public static Automaton MakeInterval(int min, int max, int digits)
Parameters
Type | Name | Description |
---|---|---|
int | min | Minimal value of interval. |
int | max | Maximal value of interval (both end points are included in the interval). |
int | digits | If > 0, use fixed number of digits (strings must be prefixed by 0's to obtain the right length) - otherwise, the number of digits is not fixed. |
Returns
Type | Description |
---|---|
Automaton |
Exceptions
Type | Condition |
---|---|
ArgumentException | If min > max or if numbers in the interval cannot be expressed with the given fixed number of digits. |
MakeString(int[], int, int)
Construction of basic automata.
Note
This API is experimental and might change in incompatible ways in the next release.
Declaration
public static Automaton MakeString(int[] word, int offset, int length)
Parameters
Type | Name | Description |
---|---|---|
int[] | word | |
int | offset | |
int | length |
Returns
Type | Description |
---|---|
Automaton |
MakeString(string)
Returns a new (deterministic) automaton that accepts the single given string.
Declaration
public static Automaton MakeString(string s)
Parameters
Type | Name | Description |
---|---|---|
string | s |
Returns
Type | Description |
---|---|
Automaton |
MakeStringUnion(ICollection<BytesRef>)
Returns a new (deterministic and minimal) automaton that accepts the union of the given collection of BytesRefs representing UTF-8 encoded strings.
Declaration
public static Automaton MakeStringUnion(ICollection<BytesRef> utf8Strings)
Parameters
Type | Name | Description |
---|---|---|
ICollection<BytesRef> | utf8Strings | The input strings, UTF-8 encoded. The collection must be in sorted order. |
Returns
Type | Description |
---|---|
Automaton | An Automaton accepting all input strings. The resulting automaton is codepoint based (full unicode codepoints on transitions). |