Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a equivelent of OrderedCollections.LittleDict? #72

Open
oxinabox opened this issue Oct 20, 2021 · 1 comment
Open

Is there a equivelent of OrderedCollections.LittleDict? #72

oxinabox opened this issue Oct 20, 2021 · 1 comment

Comments

@oxinabox
Copy link

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
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants