Click or drag to resize
VariableJaggedSubarrayT Method
Microsoft Research
Gets a jagged variable array containing items of a source list.

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


Type: MicrosoftResearch.Infer.ModelsVariableArrayT
The source array.
Type: MicrosoftResearch.Infer.ModelsVariableArrayVariableArrayInt32, Int32
Variable array containing the indices of the elements to get. indices[i][j] must be different for different j and same i, but can match for different i. The shape of this array determines the shape of the result.

Type Parameters

The domain type of array elements.

Return Value

Type: VariableArrayVariableArrayT, T
A jagged variable array with the specified items.
If all indices are different, use SplitSubarrayT(VariableArrayT, VariableArrayVariableArrayInt32, Int32). To allow duplicate indices, use GetItemsT(VariableT, VariableArrayInt32).
See Also