"Add" the element in the sparse hyperloglog data structure. * Actually nothing is added, but the max 0 pattern counter of the subset * the element belongs to is incremented if needed. * * This function is actually a wrapper for hllSparseSet(), it only performs * the hashshing of the element to obtain the index and zeros run length. */
| 901 | * This function is actually a wrapper for hllSparseSet(), it only performs |
| 902 | * the hashshing of the element to obtain the index and zeros run length. */ |
| 903 | int hllSparseAdd(robj *o, unsigned char *ele, size_t elesize) { |
| 904 | long index; |
| 905 | uint8_t count = hllPatLen(ele,elesize,&index); |
| 906 | /* Update the register if this element produced a longer run of zeroes. */ |
| 907 | return hllSparseSet(o,index,count); |
| 908 | } |
| 909 | |
| 910 | /* Compute the register histogram in the sparse representation. */ |
| 911 | void hllSparseRegHisto(uint8_t *sparse, int sparselen, int *invalid, int* reghisto) { |
no test coverage detected