boomphf

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

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

Go to latest
Published: Mar 6, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package boomphf is a fast perfect hash function for massive key sets

https://arxiv.org/abs/1702.03154

Index

Constants

View Source
const Gamma = 2

Gamma is good default value for controlling space vs. construction speed

Variables

This section is empty.

Functions

This section is empty.

Types

type H

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

H is hash function data

func New

func New(gamma float64, keys []uint64) *H

New contructs a perfect hash function for the keys. The gamma value controls the space used.

func (*H) Query

func (h *H) Query(k uint64) uint64

Query returns the index of the key

func (*H) Size

func (h *H) Size() int

Size returns the size in bytes

Jump to

Keyboard shortcuts

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