Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » Understanding pick behaviour and containers
Re: Understanding pick behaviour and containers [message #15650 is a reply to message #15635] Fri, 02 May 2008 08:27 Go to previous messageGo to previous message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

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.

[Updated on: Fri, 02 May 2008 08:29]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Convenient work with options/properties
Next Topic: cout, cin etc. question
Goto Forum:
  


Current Time: Thu May 16 14:58:20 CEST 2024

Total time taken to generate the page: 0.02264 seconds