pgm

package module
v0.0.0-...-e2df0d9 Latest Latest
Warning

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

Go to latest
Published: May 28, 2021 License: MIT Imports: 2 Imported by: 1

README

PGM-index

A Go implementation of the PGM index

What is a PGM index?

Website | Paper

The Piecewise Geometric Model index (PGM-index) is a data structure that enables fast lookup, predecessor, range searches and updates in arrays of billions of items using orders of magnitude less space than traditional indexes while providing the same worst-case query time guarantees.

Paolo Ferragina and Giorgio Vinciguerra. The PGM-index: a fully-dynamic compressed learned index with provable worst-case bounds. PVLDB, 13(8): 1162-1175, 2020.

Credit

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApproxPos

type ApproxPos struct {
	Pos int
	Lo  int
	Hi  int
}

type Index

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

Index contains the PGM index. It is just a hierarchy of segments.

func NewIndex

func NewIndex(input []float64, epsilon int) *Index

NewIndex returns a new static PGM index.

func (*Index) Search

func (ind *Index) Search(k float64) (ApproxPos, error)

type Segment

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

Segment contains the slope and intercept of the line segment and the corresponding key.

Jump to

Keyboard shortcuts

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