inthash

package
v0.0.0-...-f50d829 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package inthash is integer hashing functions

Taken from

https://web.archive.org/web/20120720045250/http://www.cris.com/~Ttwang/tech/inthash.htm
http://burtleburtle.net/bob/hash/integer.html

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Hash32

func Hash32(key uint32) uint32

Hash32 hashes a uint64

func Hash64

func Hash64(key uint64) uint64

Hash64 hashes a uint64

func Hash64Inv

func Hash64Inv(key uint64) uint64

Hash64Inv is the inverse of Hash64. Hash64Inv(Hash64(x)) == x.

func Jenkins32

func Jenkins32(a uint32) uint32

Jenkins32 is Robert Jenkins' 32-bit integer hash function

func Jenkins96

func Jenkins96(a, b, c uint32) uint32

Jenkins96 is Robert Jenkins' 96-bit integer hash function, mixing three uint32s into a single uint32 value.

func JenkinsShift32

func JenkinsShift32(a uint32) uint32

func LecuyerPanneton32

func LecuyerPanneton32(y uint32) uint32

func Lowbias32

func Lowbias32(x uint32) uint32

exact bias: 0.17353355999581582

func Lowbias32_r

func Lowbias32_r(x uint32) uint32

inverse

func Murmur3_64_Finalizer

func Murmur3_64_Finalizer(key uint64) uint64

func Triple32

func Triple32(x uint32) uint32

exact bias: 0.020888578919738908

func Xorshift32

func Xorshift32(y uint32) uint32

Xorshift32 is an xorshift RNG

func XorshiftMult64

func XorshiftMult64(x uint64) uint64

64-bit xorshift multiply rng from http://vigna.di.unimi.it/ftp/papers/xorshift.pdf

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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