CircularArrayBuffers.CircularArrayBufferType
CircularArrayBuffer{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 Arrays of the same size.

CircularArrayBuffers._buffer_frameMethod
_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_indexMethod
_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_indexMethod
wrap_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.