Struct Automaton<TSequence, TElement, TElementDistribution, TSequenceManipulator, TThis>.State
Represents a reference to a state of automaton for exposure in public API.
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
public readonly struct State : IEquatable<Automaton<TSequence, TElement, TElementDistribution, TSequenceManipulator, TThis>.State>
Properties
CanEnd
Gets a value indicating whether the ending weight of this state is greater than zero.
Declaration
public readonly bool CanEnd { get; }
Property Value
EndWeight
Gets the ending weight of the state.
Declaration
public readonly Weight EndWeight { get; }
Property Value
Index
Gets the index of the state.
Declaration
public readonly int Index { get; }
Property Value
Transitions
Declaration
public readonly ReadOnlyArraySegment<Automaton<TSequence, TElement, TElementDistribution, TSequenceManipulator, TThis>.Transition> Transitions { get; }
Property Value
Methods
Equals(Automaton<TSequence, TElement, TElementDistribution, TSequenceManipulator, TThis>.State)
Compares 2 states for equality.
Declaration
public readonly bool Equals(Automaton<TSequence, TElement, TElementDistribution, TSequenceManipulator, TThis>.State that)
Parameters
Returns
Equals(Object)
Declaration
public override readonly bool Equals(object obj)
Parameters
Type |
Name |
Description |
Object |
obj |
|
Returns
Overrides
GetHashCode()
Declaration
public override readonly int GetHashCode()
Returns
Overrides
ReadTo(ref Automaton<TSequence, TElement, TElementDistribution, TSequenceManipulator, TThis>.Builder, Func<Int32>, Func<Double>, Func<TElementDistribution>, Boolean)
Reads state and appends it into Automaton builder. Returns index in the serialized data.
If checkIndex
is true, will throw exception if serialized index
does not match index in deserialized states array. This check is bypassed only when
start state is serialized second time.
Declaration
public static int ReadTo(ref Automaton<TSequence, TElement, TElementDistribution, TSequenceManipulator, TThis>.Builder builder, Func<int> readInt32, Func<double> readDouble, Func<TElementDistribution> readElementDistribution, bool checkIndex = false)
Parameters
Returns
ToString()
Returns a string that represents the state.
Declaration
public override readonly string ToString()
Returns
Type |
Description |
String |
A string that represents the state.
|
Overrides
Write(Action<Double>, Action<Int32>, Action<TElementDistribution>)
Declaration
public readonly void Write(Action<double> writeDouble, Action<int> writeInt32, Action<TElementDistribution> writeElementDistribution)
Parameters
Operators
Equality(Automaton<TSequence, TElement, TElementDistribution, TSequenceManipulator, TThis>.State, Automaton<TSequence, TElement, TElementDistribution, TSequenceManipulator, TThis>.State)
Compares 2 states for equality.
Declaration
public static bool operator ==(Automaton<TSequence, TElement, TElementDistribution, TSequenceManipulator, TThis>.State a, Automaton<TSequence, TElement, TElementDistribution, TSequenceManipulator, TThis>.State b)
Parameters
Returns
Inequality(Automaton<TSequence, TElement, TElementDistribution, TSequenceManipulator, TThis>.State, Automaton<TSequence, TElement, TElementDistribution, TSequenceManipulator, TThis>.State)
Compares 2 states for inequality.
Declaration
public static bool operator !=(Automaton<TSequence, TElement, TElementDistribution, TSequenceManipulator, TThis>.State a, Automaton<TSequence, TElement, TElementDistribution, TSequenceManipulator, TThis>.State b)
Parameters
Returns
Implements