JuliaCollections / JuliaCollections/DataStructures.jl
N-dimensional (pre-allocating) circular buffer
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 745
- Forks
- 261
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
I noticed that current implementation of circular buffer is only 1 dimension.
A generalized approach of this problem will be nice (especially for implementing streaming timeseries)
So, instead of pushing a single value in a 1D circular buffer,
- it will be possible to push an
Array{T,1}in a 2D circular buffer - it will be possible to push an
Array{T,2}in a 3D circular buffer - it will be possible to push an
Array{T,N-1}in a N-D circular buffer
I also noticed that current implementation of circular buffer is using a Vector with size increasing (until capacity is reached). Maybe pre-allocating array will be a more efficient approach ?
@tbreloff I noticed you are original author.
What is your opinion about this ?
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
Start by locating the current circular-buffer implementation and its tests; the issue names no files or test entry points. Read how values are pushed and capacity is handled before defining the scope. Done would require an agreed design for N-dimensional pushes and pre-allocation, plus tests covering both behaviors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100