isabella232 / CircullarBuffer-CSharp

A simple, single file, implementation of a circular buffer in C#.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simple implementation of a circular buffer in C#.
This is a single file implementation, which means that you only need to copy 
the CircularBuffer.cs file to your project and use it.

What is a circular buffer? 

"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 means that you have predefined memory usage. Push and Pop operations 
are always O(1). Index access is also O(1).

More info @ wikipedia: http://en.wikipedia.org/wiki/Circular_buffer


License:
 ----------------------------------------------------------------------------
 "THE BEER-WARE LICENSE" (Revision 42):
 Joao Portela wrote this file. As long as you retain this notice you
 can do whatever you want with this stuff. If we meet some day, and you think
 this stuff is worth it, you can buy me a beer in return.
 Joao Portela
 ----------------------------------------------------------------------------

About

A simple, single file, implementation of a circular buffer in C#.


Languages

Language:C# 100.0%