View Source hyper (hyper v0.5.0)

Implementation of HyperLogLog with bias correction as described in the Google paper, http://static.googleusercontent.com/external_content/untrusted_dlcp/ research.google.com/en//pubs/archive/40671.pdf

Link to this section Summary

Link to this section Types

-type filter() :: #hyper{}.
-type precision() :: 4..16.
-type registers() :: any().
-type value() :: binary().
-type version() :: atom().

Link to this section Functions

-spec card(filter()) -> float().
-spec from_json(any()) -> filter().
-spec from_json(any(), module()) -> filter().
-spec insert(value(), filter()) -> filter().
-spec insert_many([value()], filter()) -> filter().
Link to this function

intersect_card(Left, Right)

View Source
-spec intersect_card(filter(), filter()) -> float().
-spec is_hyper(filter()) -> boolean().
-spec new(precision()) -> filter().
-spec new(precision(), module()) -> filter().
-spec new(precision(), module(), version()) -> filter().
Link to this function

reduce_precision(P, Hyper)

View Source
-spec to_json(filter()) -> any().
-spec union([filter()]) -> filter().