Crate numcodecs_fixed_offset_scale

Source
Expand description

CI Status MSRV Latest Version Rust Doc Crate Rust Doc Main

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

Structs§

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

Enums§

FixedOffsetScaleCodecError
Errors that may occur when applying the FixedOffsetScaleCodec.

Functions§

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