I'm looking for a means of mai
I'm looking for a means of maintaining a hash in the inserted (created) order.
Here is an example of the (undesirable) behaviour that I'm currently seeing:
for (label i=0; i < 10; i++)
hash.insert(word("key" + Foam::name(i)), i);
Info << hash << endl;
At the moment, the first, rather inelegant, workaround I came up is to combine a HashTable<label> (for the keyword lookup) and a Map<entry> (to maintain the insertion order).
The net effect is something like HashTable<entry,word,hash<label> >, but a bit clumsier.
Any hints about a better way?
Note: the email version of the
Note: the email version of the posting is terribly mangled. Please see the web version
|All times are GMT -4. The time now is 13:03.|