TimeWeightedStatistic

class TimeWeightedStatistic(var timeGetter: GetTimeIfc = DefaultTimeGetter(), initialValue: Double = 0.0, initialTime: Double = 0.0) : Collector, WeightedStatisticIfc(source)

Collects time weighted statistics that are presented to the collect() method. The property, timeGetter, must provide values for each observed value that appears in the collect method.

Parameters

initialTime

assumed to be 0.0 by default

initialValue

assumed to be 0.0 by default

Constructors

Link copied to clipboard
constructor(values: DoubleArray, times: DoubleArray, initialValue: Double = 0.0, initialTime: Double = 0.0)
constructor(timeGetter: GetTimeIfc = DefaultTimeGetter(), initialValue: Double = 0.0, initialTime: Double = 0.0)

Properties

Link copied to clipboard
open override val count: Double

Gets the count of the number of the observations.

Link copied to clipboard
open override val csvStatistic: String
Link copied to clipboard
open override val csvStatisticHeader: String

The header string for the CVS representation

Link copied to clipboard
open override val lastWeight: Double

Gets the last observed weight

Link copied to clipboard
open override val max: Double

Gets the maximum of the observations.

Link copied to clipboard
open override val min: Double

Gets the minimum of the observations.

Link copied to clipboard
open override val numberMissing: Double

When a data point having the value of (Double.NaN, Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY) are presented it is excluded from the summary statistics and the number of missing points is noted. If the weight is infinite or less than or equal to zero, then the data point should not be recorded. This method reports the number of missing points that occurred during the collection.

Link copied to clipboard
Link copied to clipboard
open override val sumOfWeights: Double

Gets the sum of the observed weights.

Link copied to clipboard
Link copied to clipboard
open override val unWeightedSum: Double
Link copied to clipboard
Link copied to clipboard
open override val weightedAverage: Double

Gets the weighted average of the collected observations.

Link copied to clipboard
open override val weightedSum: Double

Gets the weighted sum of observations observed.

Link copied to clipboard
open override val weightedSumOfSquares: Double

Gets the weighted sum of squares for observations observed.

Functions

Link copied to clipboard
open override fun collect(obs: Double)

Collect on the supplied value. Double.NaN, Double.NEGATIVE_INFINITY, and Double.POSITIVE_INFINITY values are counted as missing. Null values are not permitted.

fun collect(obs: Double, time: Double)
Link copied to clipboard
open override fun reset()

Resets the collector as if no observations had been collected.

Link copied to clipboard
open override fun toString(): String