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