Dictionaries.jl icon indicating copy to clipboard operation
Dictionaries.jl copied to clipboard

Is there a equivelent of OrderedCollections.LittleDict?

Open oxinabox opened this issue 4 years ago • 1 comments

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

oxinabox avatar Oct 20 '21 15:10 oxinabox

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.

andyferris avatar Oct 20 '21 21:10 andyferris