Class BasicAutomata
Construction of basic automata.
Note
This API is experimental and might change in incompatible ways in the next release.
Inheritance
Inherited Members
Namespace: Lucene.Net.Util.Automaton
Assembly: Lucene.Net.dll
Syntax
public static class BasicAutomata
Methods
| Improve this Doc View SourceMakeAnyChar()
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(Int32)
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 |
---|---|---|
System.Int32 | c |
Returns
Type | Description |
---|---|
Automaton |
MakeCharRange(Int32, Int32)
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 |
---|---|---|
System.Int32 | min | |
System.Int32 | 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(Int32, Int32, Int32)
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 |
---|---|---|
System.Int32 | min | Minimal value of interval. |
System.Int32 | max | Maximal value of interval (both end points are included in the interval). |
System.Int32 | 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 |
---|---|
System.ArgumentException | If min > max or if numbers in the interval cannot be expressed with the given fixed number of digits. |
MakeString(Int32[], Int32, Int32)
Declaration
public static Automaton MakeString(int[] word, int offset, int length)
Parameters
Type | Name | Description |
---|---|---|
System.Int32[] | word | |
System.Int32 | offset | |
System.Int32 | 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 |
---|---|---|
System.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 |
---|---|---|
System.Collections.Generic.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). |