#include "tensorstore/index_interval.h"
Result<IndexInterval>
tensorstore::GetAffineTransformInverseDomain(IndexInterval interval,
                                             
Index offset,
                                             
Index divisor);

Computes the interval containing all indices x for which (x - offset) / divisor is in interval, where / rounds towards 0.

The result is the same as GetAffineTransformRange, except that for non-empty interval:

For example:

GetAffineTransformRange([2, 4], 1, 3) -> [ 7, 13] GetAffineTransformInverseDomain([2, 4], 1, 3) -> [ 7, 15] GetAffineTransformRange([2, 4], 1, -3) -> [-11, -5] GetAffineTransformInverseDomain([2, 4], 1, -3) -> [-13, -5]

Parameters:
IndexInterval interval

The domain of the affine transform.

Index offset

The offset of the affine transform.

Index divisor

The multiplier of the affine transform.

Returns:

The range of the affine transform.

Error absl::StatusCode::kInvalidArgument:

if the result interval cannot be represented.