25.5 Some mathematical-support related objects

INTEGRATOR OBJECTS Integrator Objects support the approximate computation of continuous integrals using discrete sums. The running sum(integral) is computed as: sum_ += [lasty_ * (x lastx_)] where (x, y) is the last element entered and (lastx_, lasty_) was the element previous to that added to the sum. lastx_ and lasty_ are updated as new elements are added. The first sample point defaults to (0,0) that can be changed by changing the values of (lastx_,lasty_). $integrator newpoint x y
Add the point (x,y) to the sum. Note that it does not make sense for x to be less than lastx_.

There are no configuration parameters specific to this object.

State Variables are:

lastx_
x-coordinate of the last sample point.

lasty_
y-coordinate of the last sample point.

sum_
Running sum (i.e. the integral) of the sample points.

SAMPLES OBJECT Samples Objects support the computation of mean and variance statistics for a given sample.

$samples mean
Returns mean of the sample.

$samples variance
Returns variance of the sample.

$samples cnt
Returns a count of the sample points considered.

$samples reset
Reset the Samples object to monitor a fresh set of samples.

There are no configuration parameters or state variables specific to this object.

Tom Henderson 2011-11-05