I am working on some code that processes vectors of data of length 6000 elements. When I detect specific criteria, I want to reprocess the last 100 vectors to extract finer details. Thus I want to store the data in a form of a FIFO “cache”, replacing the oldest data as I go.
I am thinking of using a circular buffer, but I’m not seeing a package that directly support it.
I see there is Ringbuffers.jl which wraps a C library. I don’t specifically want to use it as a FIFO with variable amount of data and thus the reading will not be simple pop in sequence (for example might need to fetch some of the data twice if 2 events are detected within 100 vectors of each other, thus I’m not sure if the read interfacing supported with Ringbuffers.jl will be limiting for my use case.
I also see FFTViews.jl which seems to implement a periodic indexing but come with a number of warnings about using it away from FFT.
My guess is either of them can be made to work, or creating a custom implementation might also not be too difficult.
Any thoughts or suggestions?
Thanks