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 » what about VectorBiMap / ArrayBiMap ?
Re: what about VectorBiMap / ArrayBiMap ? [message #26410 is a reply to message #26407] Fri, 30 April 2010 10:49 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14267
Registered: November 2005
Ultimate Member
kohait00 wrote on Fri, 30 April 2010 03:55

if you have lets say VectorMap<String, String> which is kind of a dictionary map, than you can search in one direction using the Find method.



What you mean by direction? If you want to search starting with the last element with the value, you still can - FindLast, FindPrev.

Quote:


but if you want to look for the key that corresponds to a value, than there is only FindIndex(), which is sort of plain compare loop. what about having a container class, that offers both directions?



Just use pair of Indexes.

In fact, the Index is the ultimate mapping weapon. VectorMap is just its common use wrapper... Smile

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: _pick understanding
Next Topic: FileMove behaviour
Goto Forum:
  


Current Time: Fri Aug 29 18:00:06 CEST 2025

Total time taken to generate the page: 0.04542 seconds