#include "tensorstore/index_space/index_transform_builder.h"
IndexTransformBuilder&
tensorstore::IndexTransformBuilder<InputRank, OutputRank>::
    
output_constant(DimensionIndex output_dim, Index offset);

Sets the output index map for output dimension output_dim to a OutputIndexMethod::constant map with the specified offset.

Specifically, specifies the mapping:

output[output_dim] = offset.

This type of mapping has the effect of slicing a single index of the output dimension, and is used to implement DimExpression::IndexSlice.

Parameters:
DimensionIndex output_dim

The output dimension for which to set the output index map.

Index offset

The constant output index for output_dim.

Pre:

valid() == true

Checks:

0 <= output_dim && output_dim < output_rank().

Note

This method overrides any output index map for output_dim specified by a previous output_*(output_dim, ...) call.