Subject: Re: [boost] [hash] regular behaviour of hash function for double values
From: Dave Abrahams (dave_at_[hidden])
Date: 2012-02-01 10:09:31
on Tue Jan 31 2012, Daniel James <dnljms-AT-gmail.com> wrote:
> On 31 January 2012 20:31, Christopher Jefferson <chris_at_[hidden]> wrote:
>> 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.
> Feel free to do so. Although, I'd probably write it to use better
> algorithms where possible, and just use boost::hash as a fallback for
> when they're not. I think I've mentioned before that I regret calling
> it 'boost::hash', 'boost::functional::hash' would have been a better
Would you mind explaining why?
-- Dave Abrahams BoostPro Computing http://www.boostpro.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk