Boost logo

Boost Users :

Subject: [Boost-users] How to best use unordered_set or unordered_map to hold small array(s) of ints
From: B Hart (bhartsb_at_[hidden])
Date: 2010-08-20 14:58:33


I posted this last night, but not sure it went through to the list as I
don't see it in my sent items and I never got any responses. Sorry if it is
duplicate.

I'm hoping someone could offer an example or advice on how to best use
unordered_set or unordered_map to hold many small arrays of unsigned
integers.
I would like to use the built in hash function rather than have to create
one. Also, since I have many of these small arrays, keeping the memory
footprint small and the hash time at a minimum are important concerns.

A typical int array would hold 5 unsigned ints.

Maybe someone could offer example code or suggestions. The samples I see
are always the trivial case of just entering a single number or string as
key or value.

Thanks.



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