Documentation ¶
Index ¶
- Constants
- Variables
- func BoolToInt(b bool) int
- func CeilPowerOf2(n int) int
- func ExactLog2(powerOf2 int) (int, error)
- func FindWithInequality[C comparable](arr []C, low int, high int, v C, crit Inequality, ...) int
- func FloorPowerOf2(n int64) int64
- func GetShortLE(array []byte, offset int) int
- func InvPow2(e int) (float64, error)
- func IsNil[T any](t T) bool
- func IsPowerOf2(powerOf2 int) bool
- func PutShortLE(array []byte, offset int, value int)
- func QuickSelect(arr []int64, lo int, hi int, pivot int) int64
- type Inequality
Constants ¶
View Source
const ( JavaPath = "../serialization_test_data/java_generated_files" CppPath = "../serialization_test_data/cpp_generated_files" GoPath = "../serialization_test_data/go_generated_files" )
View Source
const (
DEFAULT_UPDATE_SEED = uint64(9001)
)
View Source
const (
DSketchTestGenerateGo = "DSKETCH_TEST_GENERATE_GO"
)
View Source
const (
InverseGolden = float64(0.6180339887498949025)
)
Variables ¶
View Source
var FamilyEnum = &families{
HLL: family{
Id: 7,
MaxPreLongs: 1,
},
Frequency: family{
Id: 10,
MaxPreLongs: 4,
},
Kll: family{
Id: 15,
MaxPreLongs: 2,
},
}
Functions ¶
func CeilPowerOf2 ¶
CeilPowerOf2 returns the smallest power of 2 greater than or equal to n.
func FindWithInequality ¶
func FindWithInequality[C comparable](arr []C, low int, high int, v C, crit Inequality, comparator common.CompareFn[C]) int
func FloorPowerOf2 ¶
func GetShortLE ¶
GetShortLE gets a short value from a byte array in little endian format.
func IsPowerOf2 ¶
IsPowerOf2 returns true if the given number is a power of 2.
func PutShortLE ¶
PutShortLE puts a short value into a byte array in little endian format.
Types ¶
type Inequality ¶
type Inequality int64
const ( InequalityLT Inequality = iota InequalityLE InequalityGE InequalityGT )
Click to show internal directories.
Click to hide internal directories.