Class VariableArray2D<T>
Two-dimensional flat variable array.
Inheritance
Variable<T[,]>
VariableArrayBase<Variable<T>, T[,]>
VariableArray2D<Variable<T>, T[,]>
VariableArray2D<T>
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Models
Assembly: Microsoft.ML.Probabilistic.Compiler.dll
Syntax
public class VariableArray2D<T> : VariableArray2D<Variable<T>, T[, ]>, CanGetContainers, IModelExpression<T[, ]>, SettableTo<Variable<T[, ]>>, ICloneable, HasItemVariables, IVariableJaggedArray, SettableTo<VariableArray2D<Variable<T>, T[, ]>>, IVariableArray2D<T>, SettableTo<VariableArray2D<T>>, IVariableArray, IVariable, IModelExpression, HasObservedValue
Type Parameters
Name | Description |
---|---|
T |
Constructors
VariableArray2D(VariableArray2D<T>)
Copy constructor.
Declaration
protected VariableArray2D(VariableArray2D<T> that)
Parameters
Type | Name | Description |
---|---|---|
VariableArray2D<T> | that |
Methods
Attrib(ICompilerAttribute)
Inline method for adding an attribute to a random variable. This method returns the random variable object, so that is can be used in an inline expression. e.g. Variable.GaussianFromMeanAndVariance(0,1).Attrib(new MyAttribute());
Declaration
public VariableArray2D<T> Attrib(ICompilerAttribute attr)
Parameters
Type | Name | Description |
---|---|---|
ICompilerAttribute | attr | The attribute to add |
Returns
Type | Description |
---|---|
VariableArray2D<T> | The random variable object |
Attrib(QueryType)
Helper to add a query type attribute to this variable.
Declaration
public VariableArray2D<T> Attrib(QueryType queryType)
Parameters
Type | Name | Description |
---|---|---|
QueryType | queryType | The query type to use to create the attribute |
Returns
Type | Description |
---|---|
VariableArray2D<T> |
Clone()
Clone this 2-D array
Declaration
public override object Clone()
Returns
Type | Description |
---|---|
Object |
Overrides
Microsoft.ML.Probabilistic.Models.VariableArray2D<Microsoft.ML.Probabilistic.Models.Variable<T>, T[,]>.Clone()
Named(String)
Set the name of the array.
Declaration
public VariableArray2D<T> Named(string name)
Parameters
Type | Name | Description |
---|---|---|
String | name |
Returns
Type | Description |
---|---|
VariableArray2D<T> |
|
SetTo(VariableArray2D<T>)
Set this 2-D array to a specified value
Declaration
public void SetTo(VariableArray2D<T> that)
Parameters
Type | Name | Description |
---|---|---|
VariableArray2D<T> | that |
Explicit Interface Implementations
IVariableArray.ReplaceRanges(Dictionary<Range, Range>, Dictionary<IModelExpression, IModelExpression>, Boolean)
Declaration
IVariableArray IVariableArray.ReplaceRanges(Dictionary<Range, Range> rangeReplacements, Dictionary<IModelExpression, IModelExpression> expressionReplacements, bool deepCopy)
Parameters
Type | Name | Description |
---|---|---|
Dictionary<Range, Range> | rangeReplacements | |
Dictionary<IModelExpression, IModelExpression> | expressionReplacements | |
Boolean | deepCopy |
Returns
Type | Description |
---|---|
IVariableArray |
IVariableArray2D<T>.Item[IModelExpression, IModelExpression]
Sets/Gets element in array given by the index expressions
Declaration
Variable<T> IVariableArray2D<T>.this[IModelExpression index0, IModelExpression index1] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
IModelExpression | index0 | First index expression |
IModelExpression | index1 | Second index expression |
Returns
Type | Description |
---|---|
Variable<T> |