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.Murmur32

Description

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

Synopsis

Documentation

data Hash32 #

A 32 bit hash.

asWord32 :: Hash32 -> Word32 #

Extract 32 bit word from hash.

class Hashable32 a where #

Instance for

Minimal complete definition

hash32Add

Methods

hash32Add :: a -> Hash32 -> Hash32 #

Instances

Hashable32 Bool # 

Methods

hash32Add :: Bool -> Hash32 -> Hash32 #

Hashable32 Char # 

Methods

hash32Add :: Char -> Hash32 -> Hash32 #

Hashable32 Int # 

Methods

hash32Add :: Int -> Hash32 -> Hash32 #

Hashable32 Integer # 

Methods

hash32Add :: Integer -> Hash32 -> Hash32 #

Hashable32 Word32 # 

Methods

hash32Add :: Word32 -> Hash32 -> Hash32 #

Hashable32 () # 

Methods

hash32Add :: () -> Hash32 -> Hash32 #

Hashable32 ByteString # 
Hashable32 ByteString # 
Hashable32 a => Hashable32 [a] # 

Methods

hash32Add :: [a] -> Hash32 -> Hash32 #

Hashable32 a => Hashable32 (Maybe a) # 

Methods

hash32Add :: Maybe a -> Hash32 -> Hash32 #

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

Methods

hash32Add :: Either a b -> Hash32 -> Hash32 #

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

Methods

hash32Add :: (a, b) -> Hash32 -> Hash32 #

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

Methods

hash32Add :: (a, b, c) -> Hash32 -> Hash32 #

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

Methods

hash32Add :: (a, b, c, d) -> Hash32 -> Hash32 #

hash32 :: Hashable32 a => a -> Hash32 #

Create a hash using the default seed.

hash32WithSeed :: Hashable32 a => Word32 -> a -> Hash32 #

Create a hash using a custom seed.

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.