#include "tensorstore/index_space/index_transform.h"
template <DimensionIndex RankA,
         
 ContainerKind CKindA,
         
 DimensionIndex RankB,
         
 ContainerKind CKindB,
         
 DimensionIndex RankC>
Result<IndexTransform<RankA, RankC>> tensorstore::ComposeTransforms(
    
const IndexTransform<RankB, RankC, CKindA>b_to_c,
    
const IndexTransform<RankA, RankB, CKindB>a_to_b);

Composes two index transforms.

Parameters:
const IndexTransform<RankB, RankC, CKindA> &b_to_c

Index transform from index space “b” to index space “c”.

const IndexTransform<RankA, RankB, CKindB> &a_to_b

Index transform from index space “a” to index space “b”.

Pre:

b_to_c.valid() && a_to_b.valid().

Returns:

The composed transform with input_rank equal to a_to_b.input_rank() and output_rank equal to b_to_c.output_rank().

Error absl::StatusCode::kInvalidArgument:

if a_to_b.output_rank() != b_to_c.input_rank().

Error absl::StatusCode::kOutOfRange:

if the range of a_to_b is incompatible with the domain of b_to_c.

Error absl::StatusCode::kInvalidArgument:

if integer overflow occurs computing the composed transform.