Search Results for

    Show / Hide Table of Contents

    Struct Automaton<TSequence, TElement, TElementDistribution, TSequenceManipulator, TThis>.Determinization.WeightedState

    Represents

    Implements
    IComparable
    IComparable<Automaton.Determinization.WeightedState<>>
    Inherited Members
    ValueType.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetType()
    Object.ReferenceEquals(Object, Object)
    Namespace: Microsoft.ML.Probabilistic.Distributions.Automata
    Assembly: Microsoft.ML.Probabilistic.dll
    Syntax
    public struct WeightedState : IComparable, IComparable<Automaton<TSequence, TElement, TElementDistribution, TSequenceManipulator, TThis>.Determinization.WeightedState>

    Constructors

    WeightedState(Int32, Weight)

    Declaration
    public WeightedState(int index, Weight weight)
    Parameters
    Type Name Description
    Int32 index
    Weight weight

    Properties

    Index

    Index of the state.

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

    Weight

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

    WeightHighBits

    High bits of the state weight. Only these bits are used when comparing weighted states for equality or when calculating hash code.

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

    Using high bits for hash code allows to have "fuzzy" matching of WeightedStateSets. Sometimes there's more than one way to get to the same weighted state set in automaton, but due to using floating point numbers calculated weights are slightly off. Using only high 32 bits for comparison means that 20 bits of mantissa are used. Which means that difference between weights (in log space) is no more than ~~ 10e-6 which is a sufficiently good precision for all practical purposes.

    Methods

    CompareTo(Automaton<TSequence, TElement, TElementDistribution, TSequenceManipulator, TThis>.Determinization.WeightedState)

    Declaration
    public int CompareTo(Automaton<TSequence, TElement, TElementDistribution, TSequenceManipulator, TThis>.Determinization.WeightedState that)
    Parameters
    Type Name Description
    Automaton.Determinization.WeightedState<> that
    Returns
    Type Description
    Int32

    CompareTo(Object)

    Declaration
    public int CompareTo(object obj)
    Parameters
    Type Name Description
    Object obj
    Returns
    Type Description
    Int32

    Equals(Int32, Weight)

    Declaration
    public bool Equals(int index, Weight weight)
    Parameters
    Type Name Description
    Int32 index
    Weight weight
    Returns
    Type Description
    Boolean

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32
    Overrides
    ValueType.GetHashCode()

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    String
    Overrides
    ValueType.ToString()

    Implements

    System.IComparable
    System.IComparable<T>
    In This Article
    Back to top Copyright © .NET Foundation. All rights reserved.