vcorelib.math.analysis.buffer
index
/home/vkottler/src/vkottler/workspace/vcorelib/vcorelib/math/analysis/buffer.py

A simple circular buffer for floating-point numbers.

 
Classes
       
builtins.object
FloatBuffer

 
class FloatBuffer(builtins.object)
    FloatBuffer(depth: int = 10, initial: float = 0.0) -> None
 
A class implementing a simple circular buffer for floats.
 
  Methods defined here:
__call__(self, value: float) -> float
Insert an element into the buffer and return the oldest value (that
gets overwritten).
__init__(self, depth: int = 10, initial: float = 0.0) -> None
Initialize this instance.
reset(self, initial: float = 0.0) -> None
Reset the buffer.
resize(self, depth: int, initial: float = 0.0) -> None
Set a new depth for this buffer average and reset the values.

Data descriptors defined here:
__dict__
dictionary for instance variables
__weakref__
list of weak references to the object

 
Data
        DEFAULT_DEPTH = 10