hash

package
v0.0.0-...-015c70e Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2020 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HashMap = map[string]Hash{
	"arccos":  Arccos,
	"arccosh": Arccosh,
	"arcsin":  Arcsin,
	"arcsinh": Arcsinh,
	"arctan":  Arctan,
	"arctanh": Arctanh,
	"cbrt":    Cbrt,
	"cos":     Cos,
	"cosh":    Cosh,
	"erf":     Erf,
	"exp":     Exp,
	"gamma":   Gamma,
	"ln":      Ln,
	"log":     Log,
	"log10":   Log10,
	"log2":    Log2,
	"sin":     Sin,
	"sinh":    Sinh,
	"sqrt":    Sqrt,
	"tan":     Tan,
	"tanh":    Tanh,
}

Functions

This section is empty.

Types

type Hash

type Hash uint32

Hash defines perfect hashes for a predefined list of strings

const (
	Arccos  Hash = 0x1c06 // arccos
	Arccosh Hash = 0x1c07 // arccosh
	Arcsin  Hash = 0x6    // arcsin
	Arcsinh Hash = 0x7    // arcsinh
	Arctan  Hash = 0x706  // arctan
	Arctanh Hash = 0x707  // arctanh
	Cbrt    Hash = 0xe04  // cbrt
	Cos     Hash = 0x1f03 // cos
	Cosh    Hash = 0x1f04 // cosh
	Erf     Hash = 0x1203 // erf
	Exp     Hash = 0x1503 // exp
	Gamma   Hash = 0x1805 // gamma
	Ln      Hash = 0x2302 // ln
	Log     Hash = 0x2503 // log
	Log10   Hash = 0x2505 // log10
	Log2    Hash = 0x2a04 // log2
	Sin     Hash = 0x303  // sin
	Sinh    Hash = 0x304  // sinh
	Sqrt    Hash = 0x2e04 // sqrt
	Tan     Hash = 0xa03  // tan
	Tanh    Hash = 0xa04  // tanh
)

Identifiers for the hashes associated with the text in the comments.

func ToHash

func ToHash(s []byte) Hash

ToHash returns a hash Hash for a given []byte. Hash is a uint32 that is associated with the text in []byte. It returns zero if no match found.

func (Hash) Bytes

func (i Hash) Bytes() []byte

Bytes returns the text associated with the hash.

func (Hash) String

func (i Hash) String() string

String returns the text associated with the hash.

Jump to

Keyboard shortcuts

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