Open oxinabox opened 2 years ago
Yep - we got that covered!
What you are looking for is called ArrayDictionary
. There is also ArrayIndices
for LittleSet
.
At some point we should make some more-structured documentation, to make the types more discoverable.
I feel like LittleDict benifits from many of the same advantages as Dictionaries.jl has in general. Common operation I do on LittleDict is to strip off the keys, and map over the values and then reattach the keys. Which is much cleaner if done in the Dictionaries.jl way.
LittleDict is basically just a pair of two vectors. One for keys and one for values. It searchs the first to find the key position (with
isequal
). Then it uses that to index into the vector of values