Boost logo

Boost :

Subject: Re: [boost] [hash] regular behaviour of hash function for double values
From: Christopher Jefferson (chris_at_[hidden])
Date: 2012-01-31 15:31:20


On 31 Jan 2012, at 19:58, Daniel James wrote:

> On 31 January 2012 16:19, Kai Schroeder <kaischroeder3_at_[hidden]> wrote:
>> Well, I tend
>> to agree that this is a bug in TBB
>
> I actually don't. If TBB requires a better quality hash function, then
> that's fine. I also wouldn't use boost::hash or std::hash with
> google's hash tables.

It would be easy to provide a boost::hash_shuffle, that could be applied to any boost::hash and provide this stronger requirement (that there is no corrolation between (a-b) and (hash(a)-hash(b)). This would avoid the need to re-write all the existing hash functions.

Chris


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk