Vector Index Block
The Vector Index block emits individual elements of its input vector. Users add indices of interest from the parameters panel to include in the subset output. Linear (flat) indices are used, so 2d vectors of row/cols must be specified in the linear index equivalent of col_of_element * num_rows + row_of_element
. col_of_element
and row_of_element
are 0-indexed, not 1-indexed.
Indices are parsed from a String
type into a usize
. Strings ("abc", "-1", "0.123") that can't be parsed to a usize
will panic at runtime. Indices outside the bounds of the matrix will return 0. For example, if the matrix is 3x3 and the index is 10, the output will be 0.
Examples
![]() |
---|
To index the 2nd row, 2nd column value in a 2 by 2 matrix (4), we specify the linear index 3. Multiple indices can be specified. |