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

A module for working with averages.

 
Classes
       
builtins.object
MovingAverage
vcorelib.math.analysis.buffer.FloatBuffer(builtins.object)
MovingSum

 
class MovingAverage(builtins.object)
    MovingAverage(depth: int = 10, initial: float = 0.0) -> None
 
A class for managing a moving average of floats.
 
  Methods defined here:
__call__(self, value: float) -> float
Add a new value to the dataset and get the average.
__init__(self, depth: int = 10, initial: float = 0.0) -> None
Initialize this moving average.
reset(self, initial: float = 0.0) -> None
Reset the average value.
resize(self, depth: int, initial: float = 0.0) -> None
Set a new depth for this moving average and reset the value.

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

 
class MovingSum(vcorelib.math.analysis.buffer.FloatBuffer)
    MovingSum(depth: int = 10, initial: float = 0.0) -> None
 
A simple moving sum implementation.
 
 
Method resolution order:
MovingSum
vcorelib.math.analysis.buffer.FloatBuffer
builtins.object

Methods defined here:
__call__(self, value: float) -> float
Update the moving sum.
__init__(self, depth: int = 10, initial: float = 0.0) -> None
Initialize this instance.
reset(self, initial: float = 0.0) -> None
Reset the buffer and sum.

Methods inherited from vcorelib.math.analysis.buffer.FloatBuffer:
resize(self, depth: int, initial: float = 0.0) -> None
Set a new depth for this buffer average and reset the values.

Data descriptors inherited from vcorelib.math.analysis.buffer.FloatBuffer:
__dict__
dictionary for instance variables
__weakref__
list of weak references to the object