andyferris / Dictionaries.jl

An alternative interface for dictionaries in Julia, for improved productivity and performance
Other
278 stars 28 forks source link

Is there a equivelent of OrderedCollections.LittleDict? #72

Open oxinabox opened 2 years ago

oxinabox commented 2 years ago

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

andyferris commented 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.