Click or drag to resize
VariableArrayTItem, TArray Method (TItem, Range)
Microsoft Research
Create a 1D array of random variables

Namespace: MicrosoftResearch.Infer.Models
Assembly: Infer.Compiler (in Infer.Compiler.dll) Version: 2.6.41128.1 (2.6.41128.1)
Syntax
public static VariableArray<TItem, TArray> Array<TItem, TArray>(
	TItem itemPrototype,
	Range r
)
where TItem : Variable, SettableTo<TItem>, ICloneable

Parameters

itemPrototype
Type: TItem
A variable object that serves as a prototype for the array elements.
r
Type: MicrosoftResearch.Infer.ModelsRange
A Range object that is initialized with the array's length.

Type Parameters

TItem
The variable type of an item.
TArray
The domain type of the variable.

Return Value

Type: VariableArrayTItem, TArray
Returns a VariableArray object whose length is also defined by r. Each element of this array is a object of type TItem whose prototype is defined by itemPrototype.
See Also