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   |
 |
mirek
Messages: 14285 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... 
Mirek
|
|
|
|
Goto Forum:
Current Time: Mon Jan 26 09:44:03 CET 2026
Total time taken to generate the page: 0.37576 seconds
|