Documentation

Index

Constants

View Source
const ShiftStartInt64 byte = 0x20

Variables

This section is empty.

Functions

func Deinterleave

func Deinterleave(b uint64) uint64

    Deinterleave the 32-bit value starting at position 0 to get the other 32-bit value, shift it by 1 first

    func Float64ToInt64

    func Float64ToInt64(f float64) int64

    func Int64ToFloat64

    func Int64ToFloat64(i int64) float64

    func Interleave

    func Interleave(v1, v2 uint64) uint64

      Interleave the first 32 bits of each uint64 apdated from org.apache.lucene.util.BitUtil which was adapted from: http://graphics.stanford.edu/~seander/bithacks.html#InterleaveBMN

      func ValidPrefixCodedTerm

      func ValidPrefixCodedTerm(p string) (bool, int)

      func ValidPrefixCodedTermBytes

      func ValidPrefixCodedTermBytes(p []byte) (bool, int)

      Types

      type PrefixCoded

      type PrefixCoded []byte

        PrefixCoded is a byte array encoding of 64-bit numeric values shifted by 0-63 bits

        func MustNewPrefixCodedInt64

        func MustNewPrefixCodedInt64(in int64, shift uint) PrefixCoded

        func NewPrefixCodedInt64

        func NewPrefixCodedInt64(in int64, shift uint) (PrefixCoded, error)

        func NewPrefixCodedInt64Prealloc

        func NewPrefixCodedInt64Prealloc(in int64, shift uint, prealloc []byte) (
        	rv PrefixCoded, preallocRest []byte, err error)

        func (PrefixCoded) Int64

        func (p PrefixCoded) Int64() (int64, error)

        func (PrefixCoded) Shift

        func (p PrefixCoded) Shift() (uint, error)

          Shift returns the number of bits shifted returns 0 if in uninitialized state