encodeSlof: encodeSlof

Description Usage Arguments Details Value See Also

View source: R/RcppExports.R

Description

Encodes ion counts by taking the natural logarithm, and storing a fixed point representation of this. This is calculated as

unsigned short fp = log(d + 1) * fixedPoint + 0.5

Usage

1
encodeSlof(data, fixedPoint)

Arguments

data

pointer to array of double to be encoded (need memorycont. repr.)

fixedPoint

fixed point to use for encoding (see optimalSlofFixedPoint)

Details

the result vector is exactly |data| * 2 + 8 bytes long

Value

the number of encoded bytes

See Also

[decodeSlof]


RMSNumpress documentation built on Feb. 5, 2021, 1:07 a.m.