
8 Mar
2010
8 Mar
'10
2:29 a.m.
I found another implementation in http://www.cognitionresearch.org.uk/source_code/sp61_tt.zip by Tichomir Tenev. The archive contains a header, `idmap.hpp`, that defines the `idmap` template: " // Implements a map between integer IDs and values of type T // (specified by the template argument). Given its ID, a value // can be accessed in O(1). // // Insertions into the map also occur in O(1). // // IDs are assigned by the map and cannot be specified by the // client. Prior to adding an element into the map, the client // can call next_avail_id() to get the next ID that will be used " It's different and quite interesting to look through.