eliasfano32

package
v0.0.0-...-66aa405 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Count

func Count(r []byte) uint64

func Max

func Max(r []byte) uint64

func Min

func Min(r []byte) uint64

Types

type DoubleEliasFano

type DoubleEliasFano struct {
	// contains filtered or unexported fields
}

DoubleEliasFano can be used to encode two monotone sequences it is called "double" because the lower bits array contains two sequences interleaved

func (*DoubleEliasFano) Build

func (ef *DoubleEliasFano) Build(cumKeys []uint64, position []uint64)

Build construct double Elias Fano index for two given sequences

func (*DoubleEliasFano) Data

func (ef *DoubleEliasFano) Data() []uint64

Data returns binary representation of double Ellias-Fano index that has been built

func (*DoubleEliasFano) Get2

func (ef *DoubleEliasFano) Get2(i uint64) (cumKeys, position uint64)

func (*DoubleEliasFano) Get3

func (ef *DoubleEliasFano) Get3(i uint64) (cumKeys, cumKeysNext, position uint64)

func (*DoubleEliasFano) Read

func (ef *DoubleEliasFano) Read(r []byte) int

Read inputs the state of golomb rice encoding from a reader s

func (*DoubleEliasFano) Write

func (ef *DoubleEliasFano) Write(w io.Writer) error

Write outputs the state of golomb rice encoding into a writer, which can be recovered later by Read

type EliasFano

type EliasFano struct {
	// contains filtered or unexported fields
}

EliasFano can be used to encode one monotone sequence

func NewEliasFano

func NewEliasFano(count uint64, maxOffset uint64) *EliasFano

func ReadEliasFano

func ReadEliasFano(r []byte) (*EliasFano, int)

Read inputs the state of golomb rice encoding from a reader s

func (*EliasFano) AddOffset

func (ef *EliasFano) AddOffset(offset uint64)

func (*EliasFano) AppendBytes

func (ef *EliasFano) AppendBytes(buf []byte) []byte

Write outputs the state of golomb rice encoding into a writer, which can be recovered later by Read

func (*EliasFano) Build

func (ef *EliasFano) Build()

Build construct Elias Fano index for a given sequences

func (*EliasFano) Count

func (ef *EliasFano) Count() uint64

func (*EliasFano) Get

func (ef *EliasFano) Get(i uint64) uint64

func (*EliasFano) Get2

func (ef *EliasFano) Get2(i uint64) (val uint64, valNext uint64)

func (*EliasFano) Iterator

func (ef *EliasFano) Iterator() *EliasFanoIter

func (*EliasFano) Max

func (ef *EliasFano) Max() uint64

func (*EliasFano) Min

func (ef *EliasFano) Min() uint64

func (*EliasFano) Reset

func (ef *EliasFano) Reset(r []byte)

Reset - like ReadEliasFano, but for existing object

func (*EliasFano) ReverseIterator

func (ef *EliasFano) ReverseIterator() *iter.ArrStream[uint64]

func (*EliasFano) Search

func (ef *EliasFano) Search(v uint64) (uint64, bool)

func (*EliasFano) Write

func (ef *EliasFano) Write(w io.Writer) error

Write outputs the state of golomb rice encoding into a writer, which can be recovered later by Read

type EliasFanoIter

type EliasFanoIter struct {
	// contains filtered or unexported fields
}

func (*EliasFanoIter) HasNext

func (efi *EliasFanoIter) HasNext() bool

func (*EliasFanoIter) Next

func (efi *EliasFanoIter) Next() (uint64, error)

func (*EliasFanoIter) Reset

func (efi *EliasFanoIter) Reset()

func (*EliasFanoIter) Seek

func (efi *EliasFanoIter) Seek(n uint64)

func (*EliasFanoIter) SeekDeprecated

func (efi *EliasFanoIter) SeekDeprecated(n uint64)

Jump to

Keyboard shortcuts

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