eliasfano16

package
v0.0.0-...-1f8a15b Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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, minDelta 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) Build

func (ef *EliasFano) Build()

Build construct Elias Fano index for a given sequences

func (*EliasFano) Get

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

func (*EliasFano) Get2

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

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

Jump to

Keyboard shortcuts

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