|
Boost Users : |
Subject: Re: [Boost-users] Using unordered_set or unordered_map to hold small array(s) of ints
From: B Hart (bhartsb_at_[hidden])
Date: 2010-08-20 19:22:40
well assuming an unsigned int array size of 5 what do you suggest for a
reasonably good and fast hash?
I was hoping that I could use the built in hash w/o having to invent one.
On Fri, Aug 20, 2010 at 3:32 PM, OvermindDL1 <overminddl1_at_[hidden]> wrote:
> Please do not top-post.
>
> On Fri, Aug 20, 2010 at 4:07 PM, B Hart <bhartsb_at_[hidden]> wrote:
> > Just a comparison function? How is, for example, unordered set going to
> > know the end of the array, to hash it? I don't know what is happening
> > under-the-hood so I'm deferring to the list experts.
> >
> > Can you give me a simple example?
>
> How is it going to know the end?
> That depends on how you create your array and set up your hash
> function. If you have an end-of-array marker then you would stop at
> that (like how '\0' is the end-of-array marker for C strings), if it
> is a static length then you would just use that, etc...
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net