Struct Automaton<TSequence, TElement, TElementDistribution, TSequenceManipulator, TThis>.StateData
Represents a state of an automaton that is stored in the Automaton.states. This is an internal representation of the state. Automaton<TSequence, TElement, TElementDistribution, TSequenceManipulator, TThis>.State struct should be used in public APIs.
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Distributions.Automata
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
[Serializable]
[DataContract]
public readonly struct StateData
Constructors
StateData(Int32, Int32, Weight)
Initializes a new instance of the Automaton<TSequence, TElement, TElementDistribution, TSequenceManipulator, TThis>.StateData struct.
Declaration
[Construction(new string[]{"FirstTransitionIndex", "TransitionsCount", "EndWeight"})]
public StateData(int firstTransitionIndex, int transitionsCount, Weight endWeight)
Parameters
Type | Name | Description |
---|---|---|
Int32 | firstTransitionIndex | |
Int32 | transitionsCount | |
Weight | endWeight |
Properties
EndWeight
Gets or sets ending weight of the state.
Declaration
[DataMember]
public readonly Weight EndWeight { get; }
Property Value
Type | Description |
---|---|
Weight |
FirstTransitionIndex
Gets or sets index of the first transition from this state in Transitions array. All transitions for the same state are stored as a contiguous block.
Declaration
[DataMember]
public readonly int FirstTransitionIndex { get; }
Property Value
Type | Description |
---|---|
Int32 |
Remarks
During automaton construction Automaton<TSequence, TElement, TElementDistribution, TSequenceManipulator, TThis>.Builder stores transitions as linked-list instead of contiguous block. So, during construction this property contains index of the head of the linked-list of transitions.
TransitionsCount
Gets or sets count of transition in Transitions after FirstTransitionIndex which belong to this state. All transitions for the same state are stored as a contiguous block.
Declaration
[DataMember]
public readonly int TransitionsCount { get; }
Property Value
Type | Description |
---|---|
Int32 |