Popularity
1.1
Growing
Activity
0.0
-
1
1
0

Monthly Downloads: 36
Programming language: Haskell
License: BSD 3-clause "New" or "Revised" License
Tags: Math     Data Structures    
Latest version: v0.1.1

circular alternatives and similar packages

Based on the "Data Structures" category.
Alternatively, view circular alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of circular or a related project?

Add another 'Data Structures' Package

README

Circular

Circular fixed-sized stacks.

Circular stacks with fxed maximum size are just normal vectors with a pointer to the last element. They are useful because

  • memory usage is constant
  • they are fast, especially when summary statistics need to be computed across the stack (use unsafePush, if possible)
  • they can be saved, and restored using JSON format

When the stack is full, new, pushed elements replace the oldest (deepest) elements on the stack. Complex circular behavior can arise when pushes and pops are mixed. QuickCheck and unit tests with HSpec give promising results — have a look yourself.

I use circular stacks, for example, as the data type for traces of Markov chains.

Circular is actively developed and functions may be removed, renamed, or changed. New ideas are welcome!