BlackToppStudios / Mezz_Foundation

Foundational Data types that enforce no opinions on how to build games and provide many facilities that complex games need. This largely avoids graphics and physics, but provides tools like the SortedVector, CountedPtr and HashedString classes.
GNU General Public License v3.0
3 stars 0 forks source link

Flat map container #12

Closed MakoEnergy closed 5 years ago

MakoEnergy commented 6 years ago

Currently we have the SortedVector, which is a vector of objects sorted by a predicate. It only stores the one value_type, which is good for smaller object types. However for larger object types where constructing heavier weight objects may not be the best idea it would be ideal to have an associative version of the SortedVector instead. This would amount to being a SortedVector of pairs that store the key and value separately.

Additionally, having a flat map that has a binary tree to keep insert times low may be appropriate based on the use case.

MakoEnergy commented 5 years ago

This has been complete for a few months, but I've been a slacker about keeping up on closing issues.