CircularArrayBuffers.CircularArrayBuffer
— TypeCircularArrayBuffer{T}(sz::Integer...) -> CircularArrayBuffer{T, N, Array{T, N}}
CircularArrayBuffer
uses a N
-dimension Array
of size sz
to serve as a buffer for N-1
-dimension Array
s of the same size.
CircularArrayBuffers._buffer_frame
— Method_buffer_frame(cb::CircularArrayBuffer, i::Int)
Here i
is assumed to be the last dimension of cb
. Each frame
means a slice of the last dimension. Since we use circular frames (the data
buffer) underlying, this function transforms the logical i
-th frame to the real frame of the internal buffer.
CircularArrayBuffers._buffer_index
— Method_buffer_index(cb::CircularArrayBuffer, i::Int)
Return the index of the i
-th element in the buffer. Note the i
is assumed to be the linear indexing of cb
.
CircularArrayBuffers.wrap_index
— Methodwrap_index(idx, n)
Return the index of the idx
-th element in the buffer, if index is one past the size, return 1, else error.