search

package
v0.0.0-...-d1d5330 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BinarySearchLookup

func BinarySearchLookup(key float64, st *SortedTable) (offsets []int, err error)

func FullScanLookup

func FullScanLookup(key float64, st *SortedTable) (offsets []int, err error)

Types

type SortedTable

type SortedTable struct {
	Keys    []float64
	Offsets []int
}

A Sorted Table represents a collection of key:offset pairs that is sorted by key keeping offsets following their corresponding key

func NewSortedTable

func NewSortedTable(x []float64) *SortedTable

Return a Sorted Table structure sorted by key in an ascending order

Jump to

Keyboard shortcuts

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