Class DistributionArray<T>
A distribution over an array, where each element is independent and has distribution type T
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Distributions
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
[Serializable]
[DataContract]
public abstract class DistributionArray<T> : Array<T>, IArray<T>, IList<T>, ICollection<T>, CanSetAllElementsTo<T>, IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable, SettableTo<T[]>, SettableTo<Array<T>>, ICloneable, ConvertibleToArray, SettableToUniform, Diffable where T : SettableToUniform, Diffable
Type Parameters
Name | Description |
---|---|
T | The distribution type of an element |
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 |
Methods
IsUniform()
True if the distribution is uniform
Declaration
public bool IsUniform()
Returns
Type | Description |
---|---|
Boolean | True if uniform, otherwise false |
MaxDiff(Object)
The maximum difference in parameter values between this distribution and that distribution
Declaration
public virtual double MaxDiff(object that)
Parameters
Type | Name | Description |
---|---|---|
Object | that | That distribution |
Returns
Type | Description |
---|---|
Double | The maximum difference |
SetToUniform()
Set the distribution to uniform
Declaration
public void SetToUniform()