#include "tensorstore/index_space/index_domain.h"
template <DimensionIndex SubRank = dynamic_rank>
IndexDomain<SubRank, container>
tensorstore::IndexDomain<Rank, CKind>::operator[](
    
span<const DimensionIndex, SubRank> dims) const;
template <DimensionIndex SubRank>
IndexDomain<SubRank, container>
tensorstore::IndexDomain<Rank, CKind>::operator[](
    
const DimensionIndex (&dims)[SubRank]) const;

Returns a new domain in which dimension i is equal to dimension dims[i] of this domain.

Example

Given an IndexDomain orig with dimensions: "x": [2, 7), "y": [3, 10), "z": [4, 8), the result of orig[{2, 0}] is an IndexDomain with dimensions: "z": [4, 8), "x": [2, 7).

Parameters:
span<const DimensionIndex, SubRank> dims
const DimensionIndex (&dims)[SubRank]

Sequence of dimensions to include in the new domain. All dimensions in dims must be unique. May be specified as a braced list, e.g. domain[{2, 3, 0}].

Pre:

valid()

Dchecks:

dims[i] >= 0 && dims[i] < rank() for 0 <= i < dims.size().