Boost logo

Boost Users :

From: Manuel Jung (gzahl_at_[hidden])
Date: 2007-04-30 16:42:48


>>> Try using the hashed_non_unique instead of ordered_non_unique index
>>> implementation. This will use hashed values to access keys, and not a
>>> comparison function.
>>
>> Would this really work? If i use the hashed_non_unique index, i cant use
>> std::difference and "upper_bound" to get the count of same words, because
>> it isnt sorted anymore?
>> Or am i wrong?
>
> Please take a look at:
>
http://www.boost.org/libs/multi_index/doc/reference/hash_indices.html#hash_indices
>
> There is a member count (2 overloads), which can count all items with a
> given key or another member equal_range (2 overloads), which ruturns the
> pair<iterator, iterator> for begin and end of the range.

I took a look at it. Thank you very much. I never used a hashed index, but i
should sometime. For now, thanks to the quick solution some posts before, i
will optimize at another place. But ill come back, if needed!
Thank you for your help,
Bye
Manu


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