Dictionary class in C++

Frank V. Castellucci fcastel at ibm.net
Fri Jun 23 11:07:54 EDT 2000


Larry Whitley wrote:

> I am writing a python program to process some traces in preparation for
> running the traces through a model written in C++.  Python's dictionary
> class seems to give me what I'm looking for on the python side of the
> equation and I am trying to translate the dictionary to C++ constructs.
>
> Looking through the IBM Open Class library (I haven't upgraded my compiler
> to one that can do STL yet) I find a number of "collection classes".  The
> first level of organization is into Flat Collection Classes or Trees.  Of
> the two Flat seems to be right.  The next level of organization is a table
> too complicated to reproduce here.  The net is that it looks to me like the
> Dictionary is: Unordered and Keyed.   Given that the corresponding
> collection class is one of four posibilities depending on the element and
> key characteritics:
>
> Element equality and element uniqueness = Map
> Element equality and no element unizueness = Relationship.
> No Element equality and element uniqueness = Key Set.
> No Element equality and no element uniqueness = Key Bag.
>
> Can anyone help me sort the above out - which is the python dictionary?
>
> Larry

Its a Map.





More information about the Python-list mailing list