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

asWord64 :: Hash64 -> Word64 Source #

Extract 64 bit word from hash.

class Hashable64 a where Source #

Minimal complete definition

hash64Add

Methods

hash64Add :: a -> Hash64 -> Hash64 Source #

hash64AddWord64 :: Word64 -> Hash64 -> Hash64 Source #

Add a 64 bit word to the hash.

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

Create a hash using the default seed.

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

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 Source #

Combine two hash generators. E.g.,

  hashFoo (Foo a) = hash64AddInt 1 combine hash64Add a