コード例 #1
0
ファイル: judyl.go プロジェクト: riobard/go-judy
// Count the number of indexes present in the JudyL array between indexA and indexB (inclusive).
// Returns the count. 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 *JudyL) CountFrom(indexA, indexB uint64) uint64 {
	return uint64(C.JudyLCount(C.Pcvoid_t(j.array), C.Word_t(indexA), C.Word_t(indexB), nil))
}
コード例 #2
0
ファイル: judyl.go プロジェクト: riobard/go-judy
// Count the number of indexes present in the JudyL array.
// Returns the count. 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 *JudyL) CountAll() uint64 {
	return uint64(C.JudyLCount(C.Pcvoid_t(j.array), 0, math.MaxUint64, nil))
}