SumMeter

class pysad.statistics.SumMeter[source]

The statistic that keeps track of the sum of values.

sum

The summation of values.

Type:

float

num_items

The number of items that are used to update the statistic.

Type:

int

Methods

get()

Method to obtain the tracked statistic.

remove(num)

Updates the statistic by removing a particular value.

update(num)

Updates the statistic with the value for a timestep.

get()[source]

Method to obtain the tracked statistic.

Returns:

The statistic.

Return type:

float

remove(num)[source]

Updates the statistic by removing a particular value.

Parameters:

num (float) – The value to be removed.

Returns:

self.

Return type:

object

update(num)[source]

Updates the statistic with the value for a timestep.

Parameters:

num (float) – The incoming value, for which the statistic is used.

Returns:

self.

Return type:

object