Class DistributionArray2D<T>
A distribution over a 2D array, where each element is independent and has distribution type T
Implements
IArray2D<T>
IArray<T>
IList<T>
ICollection<T>
IEnumerable<T>
SettableTo<T[,]>
SettableTo<Array2D<T>>
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Distributions
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
[Serializable]
[DataContract]
public abstract class DistributionArray2D<T> : Array2D<T>, CanSetAllElementsTo<T>, IReadOnlyList<T>, IReadOnlyCollection<T>, IArray2D<T>, IArray<T>, IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable, SettableTo<T[, ]>, SettableTo<Array2D<T>>, ICloneable, ConvertibleToArray, SettableToUniform, Diffable where T : SettableToUniform, Diffable
Type Parameters
Name | Description |
---|---|
T | The distribution type. |
Constructors
DistributionArray2D()
Parameterless constructor needed for serialization
Declaration
protected DistributionArray2D()
DistributionArray2D(T[,])
Constructs a new 2-D distribution array given a 2-D array of distributions
Declaration
public DistributionArray2D(T[, ] array)
Parameters
Type | Name | Description |
---|---|---|
T[,] | array |
DistributionArray2D(Array2D<T>)
Copy constructor.
Declaration
public DistributionArray2D(Array2D<T> that)
Parameters
Type | Name | Description |
---|---|---|
Array2D<T> | that |
DistributionArray2D(Int32, Int32)
Constructs a new 2-D distribution array given the lengths of each dimension
Declaration
public DistributionArray2D(int length0, int length1)
Parameters
Type | Name | Description |
---|---|---|
Int32 | length0 | |
Int32 | length1 |
DistributionArray2D(Int32, Int32, T[])
Constructs a new 2-D distribution array given the lengths of each dimension, and an array of values to reference
Declaration
public DistributionArray2D(int length0, int length1, T[] valuesRef)
Parameters
Type | Name | Description |
---|---|---|
Int32 | length0 | |
Int32 | length1 | |
T[] | valuesRef | Array of values to reference |
Methods
IsUniform()
True if the distribution is uniform
Declaration
public bool IsUniform()
Returns
Type | Description |
---|---|
Boolean | True if all uniform, otherwise false |
MaxDiff(Object)
The maximum difference the parameters of this distribution and that distribution
Declaration
public virtual double MaxDiff(object that)
Parameters
Type | Name | Description |
---|---|---|
Object | that | That distribution array |
Returns
Type | Description |
---|---|
Double | The maximum difference |
SetToUniform()
Set the distribution to uniform
Declaration
public void SetToUniform()