The cl-murmurhash Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The cl-murmurhash Reference Manual

This is the cl-murmurhash Reference Manual, generated automatically by Declt version 2.4 "Will Decker" on Wed Jun 20 11:15:53 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

Common Lisp implementation of the 32-bit variant of MurmurHash3
, "a fast non-crytographic hashing
algorithm."

Use MURMURHASH to get the hash of an object:

     (murmurhash:murmurhash "Hash me")
     => 841354010

(You may want to use MURMURHASH:VERIFY to determine that the algorithm
is implemented correctly for your platform.)

If you want to use a different seed, you can bind the parameter
*DEFAULT-SEED*, or pass a keyword argument:

     (murmurhash:murmurhash "Hash me" :seed *new-seed*)

The size of the hash is controlled by *HASH-SIZE*, which can be bound
to 32 (the default) or 128.

There are two utilities for perfect hashing. MAKE-PERFECT-SEED takes a
list of objects and tries to find a seed that hashes them all without
collisions. MAKE-PERFECT-HASH-FUNCTION does the same, but returns a
partial application of MURMURHASH instead of the seed itself.

Note: finding a perfect seed is usually fast but nothing guarantees
success, or success in a reasonable amount of time.


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 cl-murmurhash

Author

Paul M. Rodriguez <pmr@ruricolist.com>

License

MIT

Description

32-bit version of MurmurHash3.

Dependencies
Source

cl-murmurhash.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 cl-murmurhash.asd

Location

cl-murmurhash.asd

Systems

cl-murmurhash (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 cl-murmurhash/package.lisp

Parent

cl-murmurhash (system)

Location

package.lisp

Packages

cl-murmurhash


Previous: , Up: Lisp files   [Contents][Index]

3.1.3 cl-murmurhash/cl-murmurhash.lisp

Dependency

package.lisp (file)

Parent

cl-murmurhash (system)

Location

cl-murmurhash.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 cl-murmurhash

Source

package.lisp (file)

Nickname

murmurhash

Use List

common-lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Special variables

Special Variable: *default-seed*
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Special Variable: *hash-size*
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Functions

Function: make-perfect-hash-function VALUES

Find a perfect seed for VALUES and return a partial application of MURMURHASH to that seed.

Return NIL if no perfect seed was found.

Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Function: make-perfect-seed VALUES

Find a seed that ensures every value in VALUES can be hashed without any collisions. Useful when you know a set of values in advance so the hashes can stand for the values.

Return NIL if no perfect seed was found.

Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Function: verify ()
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.3 Generic functions

Generic Function: murmurhash OBJECT &key SEED MIX-ONLY &allow-other-keys

Hash OBJECT using the 32-bit MurmurHash3 algorithm.

Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Methods
Method: murmurhash (HT hash-table) &key SEED MIX-ONLY
Method: murmurhash (ARRAY array) &key SEED MIX-ONLY
Method: murmurhash (CONS cons) &key SEED MIX-ONLY
Method: murmurhash (BV bit-vector) &key SEED MIX-ONLY
Method: murmurhash (N complex) &key SEED MIX-ONLY
Method: murmurhash (N float) &key SEED MIX-ONLY
Method: murmurhash (N ratio) &key SEED MIX-ONLY
Method: murmurhash (P pathname) &key SEED MIX-ONLY
Method: murmurhash (S symbol) &key SEED MIX-ONLY
Method: murmurhash (P package) &key SEED MIX-ONLY
Method: murmurhash (C character) &key SEED MIX-ONLY
Method: murmurhash (S string) &key SEED MIX-ONLY
Method: murmurhash (OV simple-array-unsigned-byte-8) &key SEED MIX-ONLY
Method: murmurhash (I integer) &key SEED MIX-ONLY
Method: murmurhash OBJECT &key &allow-other-keys

Previous: , Up: Exported definitions   [Contents][Index]

5.1.4 Conditions

Condition: unhashable-object-error ()
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Direct superclasses

error (condition)

Direct slots
Slot: object
Initargs

:object


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Constants

Constant: +128-bit-verification+
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Constant: +32-bit-verification+
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Macros

Macro: *= PLACE MULTIPLICAND
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Macro: += PLACE ADDEND
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Macro: ^= PLACE INT
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Macro: avalanche PLACE
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Macro: hash128-body REF
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Macro: hash32-body REF
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Macro: mixf PLACE X
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Macro: mod32 X
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Macro: rotlf PLACE S
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Macro: switch VALUE &body CLAUSES
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Macro: tree-case KEYFORM &body CASES
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Macro: ~> NEEDLE &rest HOLES
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.3 Functions

Function: * A B
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Function: + A B
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Function: 8-bit-string? S
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Function: << A S
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Function: >> A S
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Function: ^ X Y
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Function: byte-length INT
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Function: byte-ref INT POS
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Function: char-ref STRING POS
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Function: finalize SEED X
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Function: fmix32 H
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Function: hash-integer X SEED &optional MIX-ONLY
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Function: hash-octets X SEED &optional MIX-ONLY
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Function: hash-string S SEED MIX-ONLY
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Function: hash128-8-bit-string ()
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Function: hash128-integer ()
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Function: hash128-octets ()
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Function: hash32-8-bit-string ()
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Function: hash32-integer ()
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Function: hash32-octets ()
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Function: mix SEED X
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Function: rotl A S
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Function: test &key (HASH-SIZE *HASH-SIZE*)
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Function: verification-test HASHBITS EXPECTED
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Function: verification-value HASHBITS
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

5.2.4 Types

Type: -> ARGS RESULT
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Type: 8-bit-string ()
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Type: index ()
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Type: mod32 ()
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Type: octet ()
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Type: octet-vector &optional N
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)

Type: u32 ()
Package

cl-murmurhash

Source

cl-murmurhash.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   C   F   L  
Index Entry  Section

C
cl-murmurhash.asd: The cl-murmurhash<dot>asd file
cl-murmurhash/cl-murmurhash.lisp: The cl-murmurhash/cl-murmurhash<dot>lisp file
cl-murmurhash/package.lisp: The cl-murmurhash/package<dot>lisp file

F
File, Lisp, cl-murmurhash.asd: The cl-murmurhash<dot>asd file
File, Lisp, cl-murmurhash/cl-murmurhash.lisp: The cl-murmurhash/cl-murmurhash<dot>lisp file
File, Lisp, cl-murmurhash/package.lisp: The cl-murmurhash/package<dot>lisp file

L
Lisp File, cl-murmurhash.asd: The cl-murmurhash<dot>asd file
Lisp File, cl-murmurhash/cl-murmurhash.lisp: The cl-murmurhash/cl-murmurhash<dot>lisp file
Lisp File, cl-murmurhash/package.lisp: The cl-murmurhash/package<dot>lisp file

Jump to:   C   F   L  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   *   +   8   <   >   ^   ~  
A   B   C   F   G   H   M   R   S   T   V  
Index Entry  Section

*
*: Internal functions
*=: Internal macros

+
+: Internal functions
+=: Internal macros

8
8-bit-string?: Internal functions

<
<<: Internal functions

>
>>: Internal functions

^
^: Internal functions
^=: Internal macros

~
~>: Internal macros

A
avalanche: Internal macros

B
byte-length: Internal functions
byte-ref: Internal functions

C
char-ref: Internal functions

F
finalize: Internal functions
fmix32: Internal functions
Function, *: Internal functions
Function, +: Internal functions
Function, 8-bit-string?: Internal functions
Function, <<: Internal functions
Function, >>: Internal functions
Function, byte-length: Internal functions
Function, byte-ref: Internal functions
Function, char-ref: Internal functions
Function, finalize: Internal functions
Function, fmix32: Internal functions
Function, hash-integer: Internal functions
Function, hash-octets: Internal functions
Function, hash-string: Internal functions
Function, hash128-8-bit-string: Internal functions
Function, hash128-integer: Internal functions
Function, hash128-octets: Internal functions
Function, hash32-8-bit-string: Internal functions
Function, hash32-integer: Internal functions
Function, hash32-octets: Internal functions
Function, make-perfect-hash-function: Exported functions
Function, make-perfect-seed: Exported functions
Function, mix: Internal functions
Function, rotl: Internal functions
Function, test: Internal functions
Function, verification-test: Internal functions
Function, verification-value: Internal functions
Function, verify: Exported functions
Function, ^: Internal functions

G
Generic Function, murmurhash: Exported generic functions

H
hash-integer: Internal functions
hash-octets: Internal functions
hash-string: Internal functions
hash128-8-bit-string: Internal functions
hash128-body: Internal macros
hash128-integer: Internal functions
hash128-octets: Internal functions
hash32-8-bit-string: Internal functions
hash32-body: Internal macros
hash32-integer: Internal functions
hash32-octets: Internal functions

M
Macro, *=: Internal macros
Macro, +=: Internal macros
Macro, avalanche: Internal macros
Macro, hash128-body: Internal macros
Macro, hash32-body: Internal macros
Macro, mixf: Internal macros
Macro, mod32: Internal macros
Macro, rotlf: Internal macros
Macro, switch: Internal macros
Macro, tree-case: Internal macros
Macro, ^=: Internal macros
Macro, ~>: Internal macros
make-perfect-hash-function: Exported functions
make-perfect-seed: Exported functions
Method, murmurhash: Exported generic functions
Method, murmurhash: Exported generic functions
Method, murmurhash: Exported generic functions
Method, murmurhash: Exported generic functions
Method, murmurhash: Exported generic functions
Method, murmurhash: Exported generic functions
Method, murmurhash: Exported generic functions
Method, murmurhash: Exported generic functions
Method, murmurhash: Exported generic functions
Method, murmurhash: Exported generic functions
Method, murmurhash: Exported generic functions
Method, murmurhash: Exported generic functions
Method, murmurhash: Exported generic functions
Method, murmurhash: Exported generic functions
Method, murmurhash: Exported generic functions
mix: Internal functions
mixf: Internal macros
mod32: Internal macros
murmurhash: Exported generic functions
murmurhash: Exported generic functions
murmurhash: Exported generic functions
murmurhash: Exported generic functions
murmurhash: Exported generic functions
murmurhash: Exported generic functions
murmurhash: Exported generic functions
murmurhash: Exported generic functions
murmurhash: Exported generic functions
murmurhash: Exported generic functions
murmurhash: Exported generic functions
murmurhash: Exported generic functions
murmurhash: Exported generic functions
murmurhash: Exported generic functions
murmurhash: Exported generic functions
murmurhash: Exported generic functions

R
rotl: Internal functions
rotlf: Internal macros

S
switch: Internal macros

T
test: Internal functions
tree-case: Internal macros

V
verification-test: Internal functions
verification-value: Internal functions
verify: Exported functions

Jump to:   *   +   8   <   >   ^   ~  
A   B   C   F   G   H   M   R   S   T   V  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *   +  
C   O   S  
Index Entry  Section

*
*default-seed*: Exported special variables
*hash-size*: Exported special variables

+
+128-bit-verification+: Internal constants
+32-bit-verification+: Internal constants

C
Constant, +128-bit-verification+: Internal constants
Constant, +32-bit-verification+: Internal constants

O
object: Exported conditions

S
Slot, object: Exported conditions
Special Variable, *default-seed*: Exported special variables
Special Variable, *hash-size*: Exported special variables

Jump to:   *   +  
C   O   S  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   -   8  
C   I   M   O   P   S   T   U  
Index Entry  Section

-
->: Internal types

8
8-bit-string: Internal types

C
cl-murmurhash: The cl-murmurhash system
cl-murmurhash: The cl-murmurhash package
Condition, unhashable-object-error: Exported conditions

I
index: Internal types

M
mod32: Internal types

O
octet: Internal types
octet-vector: Internal types

P
Package, cl-murmurhash: The cl-murmurhash package

S
System, cl-murmurhash: The cl-murmurhash system

T
Type, ->: Internal types
Type, 8-bit-string: Internal types
Type, index: Internal types
Type, mod32: Internal types
Type, octet: Internal types
Type, octet-vector: Internal types
Type, u32: Internal types

U
u32: Internal types
unhashable-object-error: Exported conditions

Jump to:   -   8  
C   I   M   O   P   S   T   U