Class State
Automaton state.
This is a Lucene.NET EXPERIMENTAL API, use at your own risk
Inheritance
System.Object
State
Implements
System.IComparable<
State>
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Assembly: Lucene.Net.dll
Syntax
public class State : IComparable<State>, IEquatable<State>
Constructors
|
Improve this Doc
View Source
State()
Constructs a new state. Initially, the new state is a reject state.
Declaration
Properties
|
Improve this Doc
View Source
Accept
Sets acceptance for this state. If true
, this state is an accept state.
Declaration
public virtual bool Accept { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Number
Return this state's number.
Expert: Will be useless unless GetNumberedStates()
has been called first to number the states.
Declaration
public virtual int Number { get; }
Property Value
Type |
Description |
System.Int32 |
The number.
|
|
Improve this Doc
View Source
NumTransitions
Declaration
public virtual int NumTransitions { get; }
Property Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
TransitionsArray
Declaration
public Transition[] TransitionsArray { get; }
Property Value
Methods
|
Improve this Doc
View Source
AddTransition(Transition)
Adds an outgoing transition.
Declaration
public virtual void AddTransition(Transition t)
Parameters
|
Improve this Doc
View Source
CompareTo(State)
Compares this object with the specified object for order. States are
ordered by the time of construction.
Declaration
public virtual int CompareTo(State s)
Parameters
Type |
Name |
Description |
State |
s |
|
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
Equals(State)
Declaration
public bool Equals(State other)
Parameters
Type |
Name |
Description |
State |
other |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
System.Object |
obj |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
System.Object.Equals(System.Object)
|
Improve this Doc
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
Overrides
System.Object.GetHashCode()
|
Improve this Doc
View Source
GetTransitions()
Returns the set of outgoing transitions. Subsequent changes are reflected
in the automaton.
Declaration
public virtual IEnumerable<Transition> GetTransitions()
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<Transition> |
Transition set.
|
|
Improve this Doc
View Source
Reduce()
Reduces this state. A state is "reduced" by combining overlapping
and adjacent edge intervals with same destination.
Declaration
public virtual void Reduce()
|
Improve this Doc
View Source
SetTransitions(Transition[])
Declaration
public virtual void SetTransitions(Transition[] transitions)
Parameters
|
Improve this Doc
View Source
SortTransitions(IComparer<Transition>)
Returns sorted list of outgoing transitions.
Declaration
public virtual void SortTransitions(IComparer<Transition> comparer)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IComparer<Transition> |
comparer |
Comparer to sort with.
|
|
Improve this Doc
View Source
Step(Int32)
Performs lookup in transitions, assuming determinism.
Declaration
public virtual State Step(int c)
Parameters
Type |
Name |
Description |
System.Int32 |
c |
Codepoint to look up.
|
Returns
Type |
Description |
State |
Destination state, null if no matching outgoing transition.
|
See Also
|
Improve this Doc
View Source
Step(Int32, ICollection<State>)
Performs lookup in transitions, allowing nondeterminism.
Declaration
public virtual void Step(int c, ICollection<State> dest)
Parameters
Type |
Name |
Description |
System.Int32 |
c |
Codepoint to look up.
|
System.Collections.Generic.ICollection<State> |
dest |
Collection where destination states are stored.
|
See Also
|
Improve this Doc
View Source
ToString()
Returns string describing this state. Normally invoked via
ToString().
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Overrides
System.Object.ToString()
|
Improve this Doc
View Source
TrimTransitionsArray()
Downsizes transitionArray to numTransitions.
Declaration
public virtual void TrimTransitionsArray()
Operators
|
Improve this Doc
View Source
Equality(State, State)
Declaration
public static bool operator ==(State left, State right)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
GreaterThan(State, State)
Declaration
public static bool operator>(State left, State right)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
GreaterThanOrEqual(State, State)
Declaration
public static bool operator >=(State left, State right)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Inequality(State, State)
Declaration
public static bool operator !=(State left, State right)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
LessThan(State, State)
Declaration
public static bool operator <(State left, State right)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
LessThanOrEqual(State, State)
Declaration
public static bool operator <=(State left, State right)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Implements
System.IComparable<T>
System.IEquatable<T>