- Description:
The
aerospike/exp/hll
module defines functions for expressions on the HyperLogLog datatype.
- Source:
The aerospike/exp/hll
module defines functions
for expressions on the HyperLogLog datatype.
Methods
(static) add(policy, list, indexBitCount, bin) → {AerospikeExp}
- Description:
Create an expression that performs operations hll add.
- Source:
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. |
Returns:
hll bin Returns the resulting hll bin after adding elements from list.
- Type
- AerospikeExp
(static) addMH(policy, list, indexBitCount, mhBitCount, bin) → {AerospikeExp}
- Description:
Create an expression that performs operations hll addMh.
- Source:
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. |
Returns:
hll bin Returns the resulting hll bin after adding elements from list.
- Type
- AerospikeExp
(static) describe(bin) → {AerospikeExp}
- Description:
Create an expression that performs operations hll describe.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
bin |
AerospikeExp | A bin expression to apply this function to. |
Returns:
list bin A list containing the index_bit_count and minhash bit count.
- Type
- AerospikeExp
(static) getCount(bin) → {AerospikeExp}
- Description:
Create an expression that performs operations hll get count.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
bin |
AerospikeExp | A bin expression to apply this function to. |
Returns:
integer bin The estimated number of unique elements in an HLL.
- Type
- AerospikeExp
(static) getIntersectCount(list, bin) → {AerospikeExp}
- Description:
Create an expression that performs operations hll get inersect count.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
list |
AerospikeExp | A list expression of HLLs to intersect with. |
bin |
AerospikeExp | A bin expression to apply this function to. |
Returns:
integer bin Estimated number of elements in the set intersection.
- Type
- AerospikeExp
(static) getSimilarity(list, bin)
- Description:
Create an expression that performs operations hll get similarity.
- Source:
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. |
Returns:
(float bin) Estimated similarity between 0.0 and 1.0.
(static) getUnion(list, bin) → {AerospikeExp}
- Description:
Create an expression that performs operations hll get union.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
list |
AerospikeExp | A list expression of HLLs to union with. |
bin |
AerospikeExp | A bin expression to apply this function to. |
Returns:
hll bin HLL bin representing the set union.
- Type
- AerospikeExp
(static) getUnionCount(list, bin) → {AerospikeExp}
- Description:
Create an expression that performs operations hll get union count.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
list |
AerospikeExp | A list expression of HLLs to union with. |
bin |
AerospikeExp | A bin expression to apply this function to. |
Returns:
integer bin Estimated number of elements in the set union.
- Type
- AerospikeExp
(static) init(policy, indexBitCount, bin) → {AerospikeExp}
- Description:
Create expression that creates a new HLL or resets an existing HLL.
- Source:
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. |
Returns:
hll bin Returns the resulting hll bin.
- Type
- AerospikeExp
(static) initMH(policy, indexBitCount, mhBitCount, bin) → {AerospikeExp}
- Description:
Create expression that creates a new HLL or resets an existing HLL with minhash bits.
- Source:
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. |
Returns:
hll bin Returns the resulting hll bin.
- Type
- AerospikeExp
(static) mayContain(list, bin) → {AerospikeExp}
- Description:
Create an expression that checks if the HLL bin contains all keys in list..
- Source:
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. |
Returns:
integer bin 1 bin contains all of list, 0 otherwise.
- Type
- AerospikeExp
(static) update(policy, list, bin) → {AerospikeExp}
- Description:
Create an expression that performs operations hll update.
- Source:
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. |
Returns:
hll bin Returns the resulting hll bin after adding elements from list.
- Type
- AerospikeExp