JuliaCollections / JuliaCollections/DataStructures.jl
accumulator and nlargest / most common
Open
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 745
- Forks
- 261
- PR merge metrics
- No merged PRs in 30d
Description
- The order of the arguments for
nlargest(acc::Accumulator, [n])is different from other variants ofnlargest, e.g.nlargest(n, arr; kw...). I find this a bit confusing and unexpected: is it not possible to use the same convention throughout? - Relatedly, the code for nlargest for accumulators seems different from the implementation of most_common in the python counter class. It would be helpful if there were some documentation on the design decisions and time/space complexities.
- Finally, I think it'd might be worth mentioning the nlargest function in the docs for accumulators; right now I think the only mention of nlargest is on the page 'functions using heaps', and it isn't obvious from that that it'd be possible to do it with accumulators.
I could potentially help with some of these.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the accumulator nlargest entry point alongside the other nlargest variants, then read the “functions using heaps” page and accumulator documentation. Resolve the argument-order question and document the design and time/space complexities, with nlargest discoverable from the accumulator docs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data, documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100