-
Notifications
You must be signed in to change notification settings - Fork 39
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
[WIP] OrderedRobinDict #39
Conversation
@@ -0,0 +1,309 @@ | |||
using DataStructures: RobinDict; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But DataStructures has a dependency on OrderedCollections
so you can’t have OrderedCollections depend on DataStructures
The OrderedRobinDict has a RobinDict typed field
ccall(:jl_array_grow_end, Cvoid, (Any, UInt), hk, 1) | ||
nk = length(hk) | ||
@inbounds hk[nk] = key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we doing this instead of just push!(hk, key
?
else | ||
p = sortperm(d.keys; args...) | ||
end | ||
return LittleDict(d.keys[p], d.vals[p]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should not be a LittleDict
it should be a OrderedRobinDict
This is stale and was last touched 4 years ago. If you still are interested in updating this, please don't hesitate to open a new PR. |
Work on creating a generic ordered dictionary which can be easily extended to new
Dict
developed inDataStructures.jl
.I'll be documenting my design process, and later publish that in a blog. In the meantime, bear with the lot of commits, sometimes unnecessary. At the end of the pipeline, all of them will be squashed into meaningful commits, which reflects the essential features of the design process.
Task for now
iterate
accordinglyrehash!
. Implementcheck_for_rehash
andrehash!