Search Results for

    Show / Hide Table of Contents

    Struct Automaton<TSequence, TElement, TElementDistribution, TSequenceManipulator, TThis>.Transition

    Represents a transition in an automaton.

    Inherited Members
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    Object.Equals(Object, Object)
    Object.GetType()
    Object.ReferenceEquals(Object, Object)
    Namespace: Microsoft.ML.Probabilistic.Distributions.Automata
    Assembly: Microsoft.ML.Probabilistic.dll
    Syntax
    [Serializable]
    [DataContract]
    public readonly struct Transition
    Remarks

    Whenever a transition is being cloned, the element distribution is not being cloned, so the two copies share the same element distribution instance. Therefore, a manual change to an element distribution can affect multiple functions and should be avoided.

    Constructors

    Transition(Option<TElementDistribution>, Weight, Int32, Int32)

    Initializes a new instance of the Automaton<TSequence, TElement, TElementDistribution, TSequenceManipulator, TThis>.Transition struct.

    Declaration
    [Construction(new string[]{"ElementDistribution", "Weight", "DestinationStateIndex", "Group"})]
    public Transition(Option<TElementDistribution> elementDistribution, Weight weight, int destinationStateIndex, int group = 0)
    Parameters
    Type Name Description
    Option<TElementDistribution> elementDistribution

    The element distribution associated with the transition, or null if this is an epsilon transition.

    Weight weight

    The weight associated with the transition.

    Int32 destinationStateIndex

    The index of the destination state of the transition.

    Int32 group

    The group this transition belongs to.

    Properties

    DestinationStateIndex

    Gets the destination state index.

    Declaration
    public readonly int DestinationStateIndex { get; }
    Property Value
    Type Description
    Int32

    ElementDistribution

    Gets the element distribution for this transition.

    Declaration
    public readonly Option<TElementDistribution> ElementDistribution { get; }
    Property Value
    Type Description
    Option<TElementDistribution>

    Group

    Gets or sets the group this transition belongs to.

    Declaration
    public readonly int Group { get; }
    Property Value
    Type Description
    Int32

    IsEpsilon

    Gets a value indicating whether this transition is an epsilon transition.

    Declaration
    public readonly bool IsEpsilon { get; }
    Property Value
    Type Description
    Boolean

    Weight

    Gets or sets the weight associated with this transition.

    Declaration
    public readonly Weight Weight { get; }
    Property Value
    Type Description
    Weight

    Methods

    Read(Func<Int32>, Func<Double>, Func<TElementDistribution>)

    Reads a transition.

    Declaration
    public static Automaton<TSequence, TElement, TElementDistribution, TSequenceManipulator, TThis>.Transition Read(Func<int> readInt32, Func<double> readDouble, Func<TElementDistribution> readElementDistribution)
    Parameters
    Type Name Description
    Func<Int32> readInt32
    Func<Double> readDouble
    Func<TElementDistribution> readElementDistribution
    Returns
    Type Description
    Automaton.Transition<>

    ToString()

    Gets the string representation of this transition.

    Declaration
    public override readonly string ToString()
    Returns
    Type Description
    String

    The string representation of this transition.

    Overrides
    ValueType.ToString()

    With(Nullable<Option<TElementDistribution>>, Nullable<Weight>, Nullable<Int32>, Nullable<Int32>)

    Declaration
    public readonly Automaton<TSequence, TElement, TElementDistribution, TSequenceManipulator, TThis>.Transition With(Option<TElementDistribution>? elementDistribution = null, Weight? weight = null, int? destinationStateIndex = null, int? group = null)
    Parameters
    Type Name Description
    Nullable<Option<TElementDistribution>> elementDistribution
    Nullable<Weight> weight
    Nullable<Int32> destinationStateIndex
    Nullable<Int32> group
    Returns
    Type Description
    Automaton.Transition<>

    Write(Action<Int32>, Action<Double>, Action<TElementDistribution>)

    Writes the transition.

    Declaration
    public readonly void Write(Action<int> writeInt32, Action<double> writeDouble, Action<TElementDistribution> writeElementDistribution)
    Parameters
    Type Name Description
    Action<Int32> writeInt32
    Action<Double> writeDouble
    Action<TElementDistribution> writeElementDistribution
    In This Article
    Back to top Copyright © .NET Foundation. All rights reserved.