hashing

package
v0.0.0-...-c9c0c0f Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2016 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const Float64MaxUnits = float64(Units + 1)
View Source
const Units = ((1 << 20) - 1)

Variables

This section is empty.

Functions

func Hash

func Hash(s string) uint64

Hash applies a simpel FNV32 hash to our string.

func HashFloat

func HashFloat(s string, seed uint64) float64

HashFloat gives a random float number, based on the given string. We always provide the same random number for the same string, seed pair.

func MapUint64ToFloat

func MapUint64ToFloat(s, seed uint64) float64

MapUint64ToFloat converts an uint64 into a [0, 1)

Types

This section is empty.

Jump to

Keyboard shortcuts

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