Click or drag to resize
VariableSubarrayT Method (VariableT, VariableArrayInt32)
Microsoft Research
Gets a variable array containing different items of a source array.

Namespace: MicrosoftResearch.Infer.Models
Assembly: Infer.Compiler (in Infer.Compiler.dll) Version: 2.6.41128.1 (2.6.41128.1)
Syntax
public static VariableArray<T> Subarray<T>(
	Variable<T[]> array,
	VariableArray<int> indices
)

Parameters

array
Type: MicrosoftResearch.Infer.ModelsVariableT
The source array
indices
Type: MicrosoftResearch.Infer.ModelsVariableArrayInt32
Variable array containing the indices of the elements to get. The indices must all be different.

Type Parameters

T
The domain type of array elements.

Return Value

Type: VariableArrayT
variable array with the specified items
Remarks
See Also