-
#include "tensorstore/index_space/index_transform.h"
-
template <DimensionIndex OtherRank>
requires (RankConstraint::EqualOrUnspecified(OtherRank, InputRank))
friend Result<
IndexTransform<RankConstraint::And(InputRank, OtherRank),
OutputRank>>
tensorstore::IndexTransform<InputRank, OutputRank, CKind>::
ApplyIndexTransform(BoxView<OtherRank> box,
IndexTransform transform); Restricts the domain of an index transform by a box of the same rank.
This is normally invoked via the pipeline operator:
TENSORSTORE_ASSIGN_OR_RETURN(auto new_transform, transform | box);
The resultant index transform has a domain with explicit bounds given by
box
, but with the dimension labels preserved.- Requires:¶
The static rank of
box
must be compatible with the static input rank oftransform
.- Parameters:¶
- BoxView<OtherRank> box¶
The box to apply.
- IndexTransform transform¶
The index transform to restrict.
- Error absl::StatusCode::kInvalidArgument:¶
- Error absl::StatusCode::kInvalidArgument:¶
if
box
is not contained within the explicit bounds oftransform.domain()
.