|
|
|
|||||
|
Freeze Map bidirectional iterator?
Is it possible to traverse a Freeze Map backwards? Reverse/bidirectional iterators don't seem to be implemented.
A related question: how to to get the last entry in a Freeze Map (without operator-- cannot step back one entry from the end() ) thanks, alex
__________________
Alex Makarenko Australian Centre for Field Robotics The University of Sydney www.cas.edu.au project: orca-robotics.sf.net |
|
|||||
|
Hi Bernard,
Quote:
I think it'd be useful. Here's my application as an example. I have a map of timestamped data and want to retrieve a "window" around a particular point. I could define the window in terms of time and look for the boundaries but for what I want to it's more natural to define this window in terms of samples. Quote:
thanks for you help, alex
__________________
Alex Makarenko Australian Centre for Field Robotics The University of Sydney www.cas.edu.au project: orca-robotics.sf.net |
|
||||||
|
In general, adding features to Freeze depends very much on what the underlying database system provides. In this case, Freeze iterators map to Berkeley DB cursors; since Berkeley DB cursors are bidirectional, I don't see any difficulty in adding this feature to Freeze Maps. It won't require lots of code, but naturally adding such feature requires some understanding of the Freeze Map implementation and some new Berkeley DB API calls.
Currently, Freeze provides only forward iterators for Freeze dictionaries: no operator-- and no reverse iterators. Cheers, Bernard |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| getting normal map from freeze map | ctennis | Help Center | 2 | 03-09-2007 08:48 AM |
| Freeze Map doubt | pradeep | Help Center | 1 | 11-30-2006 10:28 AM |
| Freeze Map iterator should add operator += n -=n | dragzhb | Comments | 4 | 10-18-2004 11:48 PM |
| Freeze map ordering | dwk | Help Center | 1 | 04-26-2004 08:44 PM |
| about Freeze::Map::iterator | sylvain | Comments | 4 | 07-21-2003 12:28 PM |