Temporal.Calculus.rateOfChangeDouble()
Signature
double rateOfChangeDouble(PropertyAtomDouble pad, long stime, long etime, int sample_rate,
boolean bound_by_stime)
Domain
ACTION, CONDITION, QUERY, BUI
Description
This method performs a least-squares fit of a straight line (Y = mX +b) and returns the
value of the slope of the line (m) as the rate of change of the given PorpertyAtomInt over the time
interval[stime, etime]. All the times are in (milliseconds).
Parameters
Name | Type | Description |
pad | PropertyAtomDouble | The property to calculate the rate of change for. |
stime | long | start time of the interval, 0 means use oldest value's timestamp as start time. |
etime | long | end time of the interval, 0 means use newest value's timestamp as end time. |
sample_rate | int | sample rate for the interval should be greater than 0. |
bound_by_stime | boolean | true implies for stime less than oldest value's time stamp[t0] use t0. |
Returns
Type | Description |
double | returns the identified value. |
Cautions
If value did not exist through the entire interval an exception is thrown.