No description
Find a file
Graeme Yeates 0505f70b48 v0.1.2
2015-05-07 00:01:00 -04:00
docs Fix slices max val 2015-05-06 19:10:03 -04:00
test Fix slices max val 2015-05-06 19:10:03 -04:00
.gitignore Initial commit 2015-05-06 10:39:14 -04:00
.travis.yml Initial commit 2015-05-06 10:39:14 -04:00
Readme.md Add slicing, sorting and empty 2015-05-06 17:58:57 -04:00
RingBuffer.nim Fix slices max val 2015-05-06 19:10:03 -04:00
RingBuffer.nimble v0.1.2 2015-05-07 00:01:00 -04:00

Nim implementation of Circular buffers Build Status

Documentation

A circular buffer, cyclic buffer or ring buffer is a data structure that uses a single, fixed-size buffer as if it were connected end-to-end. This structure lends itself easily to buffering data streams.

Wikipedia

Usage

var b = newRingBuffer[int](5)

b.add([1, 2, 3, 4, 5])
b.add(6)
b.add([7, 8])

@b == [4, 5, 6, 7, 8]