Module: aerospike/exp/hll

The aerospike/exp/hll module defines functions for expressions on the HyperLogLog datatype.

Source:

Methods


<static> add(policy, list, indexBitCount, bin)

Create an expression that performs operations hll add.

Parameters:
Name Type Description
policy Object

hll policy value.

list AerospikeExp

A list expression of elements to add to the HLL.

indexBitCount number

Number of index bits. Must be between 4 and 16 inclusive.

bin AerospikeExp

A bin expression to apply this function to.

Source:
Returns:

hll bin Returns the resulting hll bin after adding elements from list.

Type
AerospikeExp

<static> addMH(policy, list, indexBitCount, mhBitCount, bin)

Create an expression that performs operations hll addMh.

Parameters:
Name Type Description
policy Object

hll policy value.

list AerospikeExp

A list expression of elements to add to the HLL.

indexBitCount number

Number of index bits. Must be between 4 and 16 inclusive.

mhBitCount number

Number of min hash bits. Must be between 4 and 51 inclusive.

bin AerospikeExp

A bin expression to apply this function to.

Source:
Returns:

hll bin Returns the resulting hll bin after adding elements from list.

Type
AerospikeExp

<static> describe(bin)

Create an expression that performs operations hll describe.

Parameters:
Name Type Description
bin AerospikeExp

A bin expression to apply this function to.

Source:
Returns:

list bin A list containing the index_bit_count and minhash bit count.

Type
AerospikeExp

<static> getCount(bin)

Create an expression that performs operations hll get count.

Parameters:
Name Type Description
bin AerospikeExp

A bin expression to apply this function to.

Source:
Returns:

integer bin The estimated number of unique elements in an HLL.

Type
AerospikeExp

<static> getIntersectCount(list, bin)

Create an expression that performs operations hll get inersect count.

Parameters:
Name Type Description
list AerospikeExp

A list expression of HLLs to intersect with.

bin AerospikeExp

A bin expression to apply this function to.

Source:
Returns:

integer bin Estimated number of elements in the set intersection.

Type
AerospikeExp

<static> getSimilarity(list, bin)

Create an expression that performs operations hll get similarity.

Parameters:
Name Type Description
list AerospikeExp

A list expression of HLLs to calculate similarity with..

bin AerospikeExp

A bin expression to apply this function to.

Source:
Returns:

(float bin) Estimated similarity between 0.0 and 1.0.


<static> getUnion(list, bin)

Create an expression that performs operations hll get union.

Parameters:
Name Type Description
list AerospikeExp

A list expression of HLLs to union with.

bin AerospikeExp

A bin expression to apply this function to.

Source:
Returns:

hll bin HLL bin representing the set union.

Type
AerospikeExp

<static> getUnionCount(list, bin)

Create an expression that performs operations hll get union count.

Parameters:
Name Type Description
list AerospikeExp

A list expression of HLLs to union with.

bin AerospikeExp

A bin expression to apply this function to.

Source:
Returns:

integer bin Estimated number of elements in the set union.

Type
AerospikeExp

<static> init(policy, indexBitCount, bin)

Create expression that creates a new HLL or resets an existing HLL.

Parameters:
Name Type Description
policy Object

hll policy value.

indexBitCount number

Number of index bits. Must be between 4 and 16 inclusive.

bin AerospikeExp

A bin expression to apply this function to.

Source:
Returns:

hll bin Returns the resulting hll bin.

Type
AerospikeExp

<static> initMH(policy, indexBitCount, mhBitCount, bin)

Create expression that creates a new HLL or resets an existing HLL with minhash bits.

Parameters:
Name Type Description
policy Object

hll policy value.

indexBitCount number

Number of index bits. Must be between 4 and 16 inclusive.

mhBitCount number

Number of min hash bits. Must be between 4 and 51 inclusive.

bin AerospikeExp

A bin expression to apply this function to.

Source:
Returns:

hll bin Returns the resulting hll bin.

Type
AerospikeExp

<static> mayContain(list, bin)

Create an expression that checks if the HLL bin contains all keys in list..

Parameters:
Name Type Description
list AerospikeExp

A list expression of keys to check if the HLL may contain them.

bin AerospikeExp

A bin expression to apply this function to.

Source:
Returns:

integer bin 1 bin contains all of list, 0 otherwise.

Type
AerospikeExp

<static> update(policy, list, bin)

Create an expression that performs operations hll update.

Parameters:
Name Type Description
policy Object

hll policy value.

list AerospikeExp

A list expression of elements to add to the HLL.

bin AerospikeExp

A bin expression to apply this function to.

Source:
Returns:

hll bin Returns the resulting hll bin after adding elements from list.

Type
AerospikeExp