// Count the number of indexes present in the Judy1 array between indexA and indexB (inclusive). // A return value of 0 can be valid as a count, or it can indicate a special case for fully populated array (32-bit machines only). See libjudy docs for ways to resolve this. func (j *Judy1) CountFrom(indexA, indexB uint64) uint64 { return uint64(C.Judy1Count(C.Pcvoid_t(j.array), C.Word_t(indexA), C.Word_t(indexB), nil)) }
func (j *Judy1) Count(index1 uint64, index2 uint64) uint64 { return uint64(C.Judy1Count(C.Pcvoid_t(j.val), C.Word_t(index1), C.Word_t(index2), nil)) }
// Count the number of indexes present in the Judy1 array. // A return value of 0 can be valid as a count, or it can indicate a special case for fully populated array (32-bit machines only). See libjudy docs for ways to resolve this. func (j *Judy1) CountAll() uint64 { return uint64(C.Judy1Count(C.Pcvoid_t(j.array), 0, math.MaxUint64, nil)) }