HLL

Generic HyperLogLog++ implementation.

Constructors

this
this()
this
this(uint p, uint pPrime, typeof(this.malloc) malloc, typeof(this.realloc) realloc, typeof(this.free) free)

Destructor

~this
~this()

Postblit

this(this)
this(this)

Members

Static functions

__xopEquals
bool __xopEquals(const(const(typeof(this))) , const(const(typeof(this))) )
Undocumented in source. Be warned that the author may not have intended to support it.
__xtoHash
size_t __xtoHash(const(typeof(this)) )
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

_temp_length
size_t _temp_length;
Undocumented in source.
free
HLL_Free free;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
malloc
HLL_Malloc malloc;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
p
uint p;
Undocumented in source.
pPrime
uint pPrime;
Undocumented in source.
realloc
HLL_Realloc realloc;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.

Examples

import std.experimental.allocator;
import std.experimental.allocator.mallocator;
import mir.random;
auto hll = HLL(18);
enum c = 100_000;
auto rng = Random(unpredictableSeed);        // Engines are allocated on stack or global
foreach(_; 0 .. c)
    hll.put(rng.rand!ulong);
puts("HLL++ test: counted ", hll.count, " unique values from ", c, " random values.");

Meta