-
#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 ininterval
, where/
rounds towards 0.The result is the same as
GetAffineTransformRange
, except that for non-emptyinterval
: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]