murmur-hash-0.1.0.9: MurmurHash2 implementation for Haskell.

Copyright(c) Thomas Schilling 2010
LicenseBSD-style
Maintainernominolo@gmail.com
Stabilityexperimental
Portabilityportable
Safe HaskellSafe
LanguageHaskell98

Data.Digest.Murmur64

Description

Type class and primitives for constructing 64 bit hashes using the MurmurHash2 algorithm. See http://murmurhash.googlepages.com for details on MurmurHash2.

Synopsis

Documentation

data Hash64 #

A 64 bit hash.

asWord64 :: Hash64 -> Word64 #

Extract 64 bit word from hash.

class Hashable64 a where #

Minimal complete definition

hash64Add

Methods

hash64Add :: a -> Hash64 -> Hash64 #

Instances

Hashable64 Bool # 

Methods

hash64Add :: Bool -> Hash64 -> Hash64 #

Hashable64 Char # 

Methods

hash64Add :: Char -> Hash64 -> Hash64 #

Hashable64 Int # 

Methods

hash64Add :: Int -> Hash64 -> Hash64 #

Hashable64 Integer # 

Methods

hash64Add :: Integer -> Hash64 -> Hash64 #

Hashable64 Word64 # 

Methods

hash64Add :: Word64 -> Hash64 -> Hash64 #

Hashable64 () # 

Methods

hash64Add :: () -> Hash64 -> Hash64 #

Hashable64 ByteString # 
Hashable64 ByteString # 
Hashable64 a => Hashable64 [a] # 

Methods

hash64Add :: [a] -> Hash64 -> Hash64 #

Hashable64 a => Hashable64 (Maybe a) # 

Methods

hash64Add :: Maybe a -> Hash64 -> Hash64 #

(Hashable64 a, Hashable64 b) => Hashable64 (Either a b) # 

Methods

hash64Add :: Either a b -> Hash64 -> Hash64 #

(Hashable64 a, Hashable64 b) => Hashable64 (a, b) # 

Methods

hash64Add :: (a, b) -> Hash64 -> Hash64 #

(Hashable64 a, Hashable64 b, Hashable64 c) => Hashable64 (a, b, c) # 

Methods

hash64Add :: (a, b, c) -> Hash64 -> Hash64 #

(Hashable64 a, Hashable64 b, Hashable64 c, Hashable64 d) => Hashable64 (a, b, c, d) # 

Methods

hash64Add :: (a, b, c, d) -> Hash64 -> Hash64 #

hash64AddWord64 :: Word64 -> Hash64 -> Hash64 #

Add a 64 bit word to the hash.

hash64 :: Hashable64 a => a -> Hash64 #

Create a hash using the default seed.

hash64WithSeed :: Hashable64 a => Word64 -> a -> Hash64 #

Create a hash using a custom seed. h The seed should be non-zero, but other than that can be an arbitrary number. Different seeds will give different hashes, and thus (most likely) different hash collisions.

combine :: (Hash64 -> Hash64) -> (Hash64 -> Hash64) -> Hash64 -> Hash64 #

Combine two hash generators. E.g.,

  hashFoo (Foo a) = hash64AddInt 1 combine hash64Add a