Skip to content

linearMapping

linearMapping(relativeAccuracy): IndexMapping

Defined in: packages/distillate/src/ddsketch/mapping.ts:421

A mapping that interpolates log2 linearly from the float’s bits instead of calling Math.log, at about 44% more bins than logMapping for the same accuracy. For matching sketches built with it elsewhere; in V8 it adds only slightly faster than the log mapping.

number

Relative error bound, in (0, 1).

IndexMapping

ParamError when relativeAccuracy is outside (0, 1), or so small that no value is indexable.