Temporal.Statistic.avgOverTimeInt()

Signature

double avgOverTimeInt(PropertyAtomInt pai, long stime, long etime, int sample_rate, boolean bound_by_stime)

Domain

condition, action, query

Description

This method calculates average of the property over given time interval[stime, etime].

Parameters

NameTypeDescription
paiPropertyAtomIntThe property to average the value for.
stimelongstart time of the interval, 0 means use oldest value's timestamp as start time.
etimelongend time of the interval, 0 means use newest value's timestamp as end time.
sample_rateintsample rate for the interval should be greater than 0.
bound_by_stimebooleantrue implies for stime less than oldest value's time stamp[t0] use t0.

Returns

TypeDescription
doubleaverage of all the values in the history.

Cautions

If value did not exist thourgh the entire interval an exception is thrown.