Home » U++ Library support » U++ Core » Understanding pick behaviour and containers
Re: Understanding pick behaviour and containers [message #15657 is a reply to message #15650] |
Fri, 02 May 2008 14:17 |
|
mirek
Messages: 13980 Registered: November 2005
|
Ultimate Member |
|
|
Mindtraveller wrote on Fri, 02 May 2008 02:27 | Mirek, also I want to suggest add
int AIndex::Find[Prev,Next,Last](unsigned _hash)
functions. What for?
Let`s see typical situation: I have a number of objects and I want them to be in quick access. For a number of reasons, Map doesn`t fit: i.e. key value is a natural part of internal object structure and cannot be taken out as different key object (it is possible but not good solution). Of course your hashed Index container is an ideal solution here.
Of course in some situations I want object to be found quickly and I can compute hash. But all I have in AIndex is AIndex::Find[Prev,Next,Last](const T& x, unsigned _hash)
But I don`t need this x variable, I just want object(s) who`s hash value is _hash. Also this function could make testing (are any objects with such hash value) easier.
|
Maybe you might want to use "HashBase" directly?
Mirek
|
|
|
Goto Forum:
Current Time: Fri May 17 00:58:11 CEST 2024
Total time taken to generate the page: 0.02225 seconds
|