Struct Automaton<TSequence, TElement, TElementDistribution, TSequenceManipulator, TThis>.Builder.TransitionIterator
Helper struct for iterating over currently constructed list of transitions for state. Unlike standard enumerator pattern through this iterator elements can be changed and removed.
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Distributions.Automata
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
public struct TransitionIterator
Remarks
Implemented as a value type to minimize amount of GC.
Constructors
TransitionIterator(Automaton<TSequence, TElement, TElementDistribution, TSequenceManipulator, TThis>.Builder, Int32, Int32)
Initializes new instance of Automaton<TSequence, TElement, TElementDistribution, TSequenceManipulator, TThis>.Builder.TransitionIterator struct.
Declaration
public TransitionIterator(Automaton<TSequence, TElement, TElementDistribution, TSequenceManipulator, TThis>.Builder builder, int stateIndex, int index)
Parameters
Type | Name | Description |
---|---|---|
Automaton.Builder<> | builder | |
Int32 | stateIndex | |
Int32 | index |
Properties
Ok
Gets a value indicating whether iterator is dereferenceable - its Value can be get or set. Once iteration is finished property will become false.
Declaration
public readonly bool Ok { get; }
Property Value
Type | Description |
---|---|
Boolean |
Value
Gets or sets current transition value.
Declaration
public Automaton<TSequence, TElement, TElementDistribution, TSequenceManipulator, TThis>.Transition Value { get; set; }
Property Value
Type | Description |
---|---|
Automaton.Transition<> |
Methods
Next()
Moves iterator to next transition in list.
Declaration
public void Next()
Remove()
Marks current transition as removed. This transition will not be visible during further iterations.
Declaration
public void Remove()