Boost logo

Boost :

From: Martin Weiser (weiser_at_[hidden])
Date: 2002-10-25 03:04:58

On Freitag, 25. Oktober 2002 08:04, Daryle Walker wrote:

> There are at least four ways to address the domain values:
> 1. initial x, final x, and the number of intervals between them
> 2. initial x, final x, and the interval size
> A. note that the interval size may not fit evenly

Probably a common case if evenly spaced data is available. 1 seems to be a
more or less trivial special case of 2.

> 3. initial x, final x, and letting the algorithm decide intermediate
> x's A. this is for an adaptive algorithm
> B. requires the y's to be given by a function/functor

Probably the most apropriate case if the data is indeed given by a
function/functor. Also allows for the most sophisticated, efficient,
robust, and accurate algorithms. That's the case I'm most interested in.

> 4. a list of x values to use
> A. can't assume any pattern
> B. (personal: most books I've seen don't mention this case, so I
> don't want us to forget it)
> C. cases [1] and [2] are sort-of specializations of this

The most straightforward algorithm for this would be the trapezoidal rule.
Higher order formulae may be constructed on the fly, but maybe this is
too costly. This is quite a general case and I'm not sure it's that
common: if you can evaluate the data at arbitrary positions, use 3.
Otherwise, the data is probably given externally, and that should most
often be regularly spaced. Of course I can imagine situations where it's
not, but I wonder how common they are.


Dr. Martin Weiser            Zuse Institute Berlin
weiser_at_[hidden]                Scientific Computing     Numerical Analysis and Modelling

Boost list run by bdawes at, gregod at, cpdaniel at, john at