vcorelib.math.analysis package#

Subpackages#

Submodules#

vcorelib.math.analysis.average module#

A module for working with averages.

class vcorelib.math.analysis.average.MovingAverage(depth: int = 10, initial: float = 0.0)[source]#

Bases: object

A class for managing a moving average of floats.

reset(initial: float = 0.0) None[source]#

Reset the average value.

resize(depth: int, initial: float = 0.0) None[source]#

Set a new depth for this moving average and reset the value.

class vcorelib.math.analysis.average.MovingSum(depth: int = 10, initial: float = 0.0)[source]#

Bases: FloatBuffer

A simple moving sum implementation.

reset(initial: float = 0.0) None[source]#

Reset the buffer and sum.

vcorelib.math.analysis.buffer module#

A simple circular buffer for floating-point numbers.

class vcorelib.math.analysis.buffer.FloatBuffer(depth: int = 10, initial: float = 0.0)[source]#

Bases: object

A class implementing a simple circular buffer for floats.

reset(initial: float = 0.0) None[source]#

Reset the buffer.

resize(depth: int, initial: float = 0.0) None[source]#

Set a new depth for this buffer average and reset the values.

vcorelib.math.analysis.weighted module#

A module for implementing a weighted average.

class vcorelib.math.analysis.weighted.WeightedAverage(depth: int = 10)[source]#

Bases: object

A class implementing a weighted average.

average() float[source]#

Compute the overall weighted average.

property depth: int#

This average’s depth.

reset() None[source]#

Reset the average.

Module contents#

A module for aggregating symbols for import.

class vcorelib.math.analysis.FloatBuffer(depth: int = 10, initial: float = 0.0)[source]#

Bases: object

A class implementing a simple circular buffer for floats.

reset(initial: float = 0.0) None[source]#

Reset the buffer.

resize(depth: int, initial: float = 0.0) None[source]#

Set a new depth for this buffer average and reset the values.

class vcorelib.math.analysis.MovingAverage(depth: int = 10, initial: float = 0.0)[source]#

Bases: object

A class for managing a moving average of floats.

reset(initial: float = 0.0) None[source]#

Reset the average value.

resize(depth: int, initial: float = 0.0) None[source]#

Set a new depth for this moving average and reset the value.

class vcorelib.math.analysis.MovingSum(depth: int = 10, initial: float = 0.0)[source]#

Bases: FloatBuffer

A simple moving sum implementation.

reset(initial: float = 0.0) None[source]#

Reset the buffer and sum.

class vcorelib.math.analysis.WeightedAverage(depth: int = 10)[source]#

Bases: object

A class implementing a weighted average.

average() float[source]#

Compute the overall weighted average.

property depth: int#

This average’s depth.

reset() None[source]#

Reset the average.