I've make extensive use of map<..> and multimap<...> in C++.  These are 
associative arrays with ordered keys.  I found a package called 
DataStructures.jl, but I wasn't clear whether it offers all the same 
functionality as map<...> and multimap<...>

Specifically, in map and multimap, I can get hold of an 'iterator' which is 
like a pointer to a <key,value> pair.  The iterator is itself a data item 
that can be stored in a variable, etc.  With the iterator, I can retrieve 
the key and value, and I can also increment to the next (in the sort order) 
key-value pair.  I can check whether the iterator points to the beginning 
or end of the structure.  Finally, there is a function 'lower_bound' that 
takes a key value and either gives me an iterator to that key (and its 
data), or to the next key in the sequence that would come first after the 
given key if the given key is not in the map.  Is all of that available 
from the DataStructures.jl package?

Thanks,
Steve Vavasis


Reply via email to