Search Results for

    Show / Hide Table of Contents

    Class DistributionArray<T, DomainType>

    A distribution over an array of type DomainType, where each element is independent and has distribution of type T

    Inheritance
    Object
    ArrayBase<T>
    Array<T>
    DistributionArray<T>
    DistributionArray<T, DomainType>
    DistributionRefArray<T, DomainType>
    DistributionStructArray<T, DomainType>
    Implements
    IArray<T>
    IList<T>
    ICollection<T>
    CanSetAllElementsTo<T>
    IReadOnlyList<T>
    IReadOnlyCollection<T>
    IEnumerable<T>
    IEnumerable
    SettableTo<T[]>
    SettableTo<Array<T>>
    ConvertibleToArray
    IDistribution<DomainType[]>
    IDistribution
    ICloneable
    Diffable
    SettableToUniform
    HasPoint<DomainType[]>
    CanGetLogProb<DomainType[]>
    Sampleable<DomainType[]>
    Inherited Members
    DistributionArray<T>.SetToUniform()
    DistributionArray<T>.IsUniform()
    DistributionArray<T>.MaxDiff(Object)
    Array<T>.SetTo(T[])
    Array<T>.SetTo(Array<T>)
    Array<T>.Clone()
    Array<T>.CopyTo(T[])
    Array<T>.ToArray()
    Array<T>.ConvertibleToArray.ToArray()
    Array<T>.ToArray<TOutput>(Converter<T, TOutput>, Array<T>)
    Array<T>.Rank
    Array<T>.GetLength(Int32)
    Array<T>.Equals(Object)
    Array<T>.GetHashCode()
    ArrayBase<T>.array
    ArrayBase<T>.Item[Int32]
    ArrayBase<T>.IndexOf(T)
    ArrayBase<T>.Insert(Int32, T)
    ArrayBase<T>.RemoveAt(Int32)
    ArrayBase<T>.Add(T)
    ArrayBase<T>.Clear()
    ArrayBase<T>.Contains(T)
    ArrayBase<T>.CopyTo(T[], Int32)
    ArrayBase<T>.Count
    ArrayBase<T>.IsReadOnly
    ArrayBase<T>.Remove(T)
    ArrayBase<T>.GetEnumerator()
    ArrayBase<T>.IEnumerable.GetEnumerator()
    ArrayBase<T>.ToString()
    ArrayBase<T>.CheckCompatible(IArray<T>)
    ArrayBase<T>.SetAllElementsTo(T)
    ArrayBase<T>.FindIndex(Predicate<T>)
    ArrayBase<T>.ForEach(Action<T>)
    ArrayBase<T>.ForEach<U>(U[], Action<T, U>)
    ArrayBase<T>.ForEach<U, V>(U[], V[], Action<T, U, V>)
    ArrayBase<T>.SetToFunction<U>(U[], Func<U, T>)
    ArrayBase<T>.SetToFunction<U>(ArrayBase<U>, Func<U, T>)
    ArrayBase<T>.SetToFunction<U, V>(ArrayBase<U>, V[], Func<U, V, T>)
    ArrayBase<T>.SetToFunction<U, V, W>(ArrayBase<U>, V[], W[], Func<U, V, W, T>)
    Object.Equals(Object, Object)
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Namespace: Microsoft.ML.Probabilistic.Distributions
    Assembly: Microsoft.ML.Probabilistic.dll
    Syntax
    [Serializable]
    [Quality(QualityBand.Mature)]
    [DataContract]
    public abstract class DistributionArray<T, DomainType> : DistributionArray<T>, IArray<T>, IList<T>, ICollection<T>, CanSetAllElementsTo<T>, IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable, SettableTo<T[]>, SettableTo<Array<T>>, ConvertibleToArray, IDistribution<DomainType[]>, IDistribution, ICloneable, Diffable, SettableToUniform, HasPoint<DomainType[]>, CanGetLogProb<DomainType[]>, Sampleable<DomainType[]> where T : SettableToUniform, Diffable, Sampleable<DomainType>, IDistribution<DomainType>
    Type Parameters
    Name Description
    T

    Distribution type of an element. Must be a value type all the way down, i.e. must not hold any references.

    DomainType

    Domain type of an element

    Remarks

    This is an extension of DistributionArray that implements IDistribution and Sampleable.

    Constructors

    DistributionArray()

    Parameterless constructor needed for serialization

    Declaration
    protected DistributionArray()

    DistributionArray(T[])

    Creates a distribution array from an array of distributions

    Declaration
    public DistributionArray(T[] array)
    Parameters
    Type Name Description
    T[] array

    DistributionArray(Array<T>)

    Copy constructor

    Declaration
    public DistributionArray(Array<T> that)
    Parameters
    Type Name Description
    Array<T> that

    DistributionArray(Int32)

    Creates a distribution array of a specified length

    Declaration
    public DistributionArray(int length)
    Parameters
    Type Name Description
    Int32 length

    Properties

    IsPointMass

    True if the distribution is a point mass

    Declaration
    [IgnoreDataMember]
    public bool IsPointMass { get; }
    Property Value
    Type Description
    Boolean

    Point

    Sets/gets the instance as a point mass

    Declaration
    [IgnoreDataMember]
    public DomainType[] Point { get; set; }
    Property Value
    Type Description
    DomainType[]

    Methods

    GetLogProb(DomainType[])

    Logarithm of the probability density function

    Declaration
    public double GetLogProb(DomainType[] value)
    Parameters
    Type Name Description
    DomainType[] value
    Returns
    Type Description
    Double

    Sample()

    Get a sample from the distribution array

    Declaration
    public DomainType[] Sample()
    Returns
    Type Description
    DomainType[]

    An array of samples

    Sample(DomainType[])

    Get a sample from the distribution array

    Declaration
    public abstract DomainType[] Sample(DomainType[] result)
    Parameters
    Type Name Description
    DomainType[] result

    Where to put the results

    Returns
    Type Description
    DomainType[]

    An array of samples

    Implements

    IArray<T>
    System.Collections.Generic.IList<T>
    System.Collections.Generic.ICollection<T>
    CanSetAllElementsTo<T>
    System.Collections.Generic.IReadOnlyList<T>
    System.Collections.Generic.IReadOnlyCollection<T>
    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable
    SettableTo<T>
    SettableTo<T>
    ConvertibleToArray
    IDistribution<T>
    IDistribution
    System.ICloneable
    Diffable
    SettableToUniform
    HasPoint<T>
    CanGetLogProb<T>
    Sampleable<T>

    Extension Methods

    CollectionExtensions.AddRange<T>(ICollection<T>, IEnumerable<T>)
    CollectionExtensions.ContainsAll<T>(ICollection<T>, IEnumerable<T>)
    CollectionExtensions.ContainsAny<T>(ICollection<T>, IEnumerable<T>)
    EnumerableExtensions.ForEach<T>(IEnumerable<T>, Action<T>)
    EnumerableExtensions.ForEach<T>(IEnumerable, Action<T>)
    EnumerableExtensions.ForEach<T>(IEnumerable<T>, Action<Int32, T>)
    EnumerableExtensions.ForEach<T>(IEnumerable, Action<Int32, T>)
    EnumerableExtensions.Sum<TSource>(IEnumerable<TSource>, Func<TSource, UInt32>)
    EnumerableExtensions.Sum<TSource>(IEnumerable<TSource>, Func<TSource, UInt64>)
    EnumerableExtensions.ValueEquals<T>(IEnumerable<T>, IEnumerable<T>)
    EnumerableExtensions.IndexOf<T>(IEnumerable<T>, T)
    EnumerableExtensions.IndexOf<T>(IEnumerable, T)
    EnumerableExtensions.FindIndex<T>(IEnumerable<T>, Predicate<T>)
    EnumerableExtensions.FindIndex<T>(IEnumerable, Predicate<T>)
    EnumerableExtensions.FindAllIndex<T>(IEnumerable<T>, Predicate<T>)
    EnumerableExtensions.IndexOfAll<T>(IEnumerable<T>, T)
    EnumerableExtensions.Skip<T>(IEnumerable<T>, Int32, out List<T>)
    EnumerableExtensions.CopyTo<T>(IEnumerable<T>, T[], Int32)
    EnumerableExtensions.ToReadOnlyList<T>(IEnumerable<T>)
    IEnumerableExensions.EnumerableReduce<T, TRes>(IEnumerable<T>, TRes, Func<TRes, T, TRes>, Func<TRes, T, Int32, TRes>)
    IEnumerableExensions.EnumerableSum<T>(IEnumerable<T>, Func<T, Double>)
    IEnumerableExensions.ListZip<TFirst, TSecond, TResult>(IList<TFirst>, IEnumerable<TSecond>, Func<TFirst, TSecond, TResult>)
    IEnumerableExensions.ListZip<TFirst, TSecond, TThird, TResult>(IList<TFirst>, IEnumerable<TSecond>, IEnumerable<TThird>, Func<TFirst, TSecond, TThird, TResult>)
    IEnumerableExensions.ListZip<TFirst, TSecond, TThird, TFourth, TResult>(IList<TFirst>, IList<TSecond>, IList<TThird>, IList<TFourth>, Func<TFirst, TSecond, TThird, TFourth, TResult>)
    IListExtensions.IsSparse<T>(IList<T>)
    IListExtensions.ListSelect<T, T2>(IList<T>, Func<T, T2>)
    IListExtensions.ListReduce<T, TRes>(IList<T>, TRes, Func<TRes, T, TRes>)
    IListExtensions.ListReduce<T, T2, TRes>(IList<T>, IEnumerable<T2>, TRes, Func<TRes, T, T2, TRes>)
    IListExtensions.SetTo<T>(IList<T>, IEnumerable<T>)
    IListExtensions.AsReadOnly<T>(IList<T>)
    ReadOnlyArray.ToReadOnlyArray<T>(IEnumerable<T>)
    In This Article
    Back to top Copyright © .NET Foundation. All rights reserved.