Crate numcodecs_fixed_offset_scale

Source
Expand description

CI Status MSRV Latest Version Rust Doc Crate Rust Doc Main

$\frac{x - o}{s}$ codec implementation for the numcodecs API.

Structs§

FixedOffsetScaleCodec
Fixed offset-scale codec which calculates $c = \frac{x - o}{s}$ on encoding and $d = (c \cdot s) + o$ on decoding.

Enums§

FixedOffsetScaleCodecError
Errors that may occur when applying the FixedOffsetScaleCodec.

Functions§

scale
Compute $\frac{x - o}{s}$ over the elements of the input data array.
unscale
Compute $(x \cdot s) + o$ over the elements of the input data array.
unscale_into
Compute $(x \cdot s) + o$ over the elements of the input data array and write them into the output array.