-
#include "tensorstore/index_space/dim_expression.h" -
auto tensorstore::DimExpression<Op...>::MoveTo(
DimensionIndex target) const; Transposes the input dimensions such that the selected dimensions are consecutive starting or ending at the specified
targetposition.For example,
Dims(2, 0).MoveTo(1)has the following effects:Before
After
Dimension selection
{0, 2}{1, 2}Input domain
[1, 3], [2, 5], [3, 4][2, 5], [3, 4], [1, 3]Labels
{"x", "y", "z"}{"y", "z", "x"}Equivalent input indices
{2, 3, 4}{3, 4, 2}Equivalent input indices
{x, y, z}{y, z, x}where
xis any index in[1, 3],yis any index in[2, 5], andzis any index in[3, 4].- Parameters:¶
- DimensionIndex target¶
Must be in the range
[-input_rank + selection_rank - 1, input_rank - selection_rank]. Iftarget >= 0,targetis the new index of the first selected dimension. Iftarget < 0,target + input_rankis the new index of the last selected dimension.
- Error absl::StatusCode::kInvalidArgument:¶
if
targetis outside the valid range.