View Source ddskerl_exact (ddskerl v0.2.1)

Quantile summary exact implemenation.

This implements an exact count of all elements seen, which is the slowest and most memory consuming algorithm.

It is on the other hand an exact algorithm, hence it can be used for comparison against all other approximations.

Summary

Types

DDSketch instance.

Functions

Insert a value into the DDSketch.

Merge two DDSketch instances.

Create a new DDSketch instance.

Calculate the quantile of a DDSketch.

Get the sum of elements in the DDSketch.

Get the total number of elements in the DDSketch.

Types

ddsketch()

-opaque ddsketch()

DDSketch instance.

Functions

insert/2

-spec insert(ddsketch(), number()) -> ddsketch().

Insert a value into the DDSketch.

merge/2

-spec merge(ddsketch(), ddsketch()) -> ddsketch().

Merge two DDSketch instances.

new()

-spec new() -> ddsketch().

Create a new DDSketch instance.

quantile/2

-spec quantile(ddsketch(), number()) -> number() | undefined.

Calculate the quantile of a DDSketch.

sum/1

-spec sum(ddsketch()) -> non_neg_integer().

Get the sum of elements in the DDSketch.

total/1

-spec total(ddsketch()) -> non_neg_integer().

Get the total number of elements in the DDSketch.