Just after some opinions,
I have a 2 element structure that I need to store, and am trying to consider the options available, and am not sure which approach i want to take, hopefully staying within the STD libraries.
The information being stored is a string name with an associated matrix. It needs to be searchable, but also referenced by index.
So far:
I've implemented this using a MAP, keyed by the string name, the search-ability is brilliant, however the need to access the index has come up.
I'm considering a struct based vector with searcher function, though i'd really like to avoid this if there is a more elegant solution available in library.
I've considered a list, however, the data needs to be randomly referenced, and when the index is already known i dont want to have to scan the entire list to get to the last reference (could be well over 5k references). Sets suffer from the same issue as maps, and arrays aren't intrinsically searchable or as expandable as i'd like.
I'm expecting that i'm not going to be able to avoid the Struct-Vector with search off the side, but if anyone has another idea, i'm all ears.