internal

package
v0.0.0-...-3e17171 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

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 BoolToInt

func BoolToInt(b bool) int

func CeilPowerOf2

func CeilPowerOf2(n int) int

CeilPowerOf2 returns the smallest power of 2 greater than or equal to n.

func ExactLog2

func ExactLog2(powerOf2 int) (int, error)

func FindWithInequality

func FindWithInequality[C comparable](arr []C, low int, high int, v C, crit Inequality, comparator common.CompareFn[C]) int

func FloorPowerOf2

func FloorPowerOf2(n int64) int64

func GetShortLE

func GetShortLE(array []byte, offset int) int

GetShortLE gets a short value from a byte array in little endian format.

func InvPow2

func InvPow2(e int) (float64, error)

InvPow2 returns 2^(-e).

func IsNil

func IsNil[T any](t T) bool

func IsPowerOf2

func IsPowerOf2(powerOf2 int) bool

IsPowerOf2 returns true if the given number is a power of 2.

func PutShortLE

func PutShortLE(array []byte, offset int, value int)

PutShortLE puts a short value into a byte array in little endian format.

func QuickSelect

func QuickSelect(arr []int64, lo int, hi int, pivot int) int64

Types

type Inequality

type Inequality int64
const (
	InequalityLT Inequality = iota
	InequalityLE
	InequalityGE
	InequalityGT
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL