![]() |
Prev | Next |
# include <cppad/romberg_mul.hpp>
RombergMul<
Fun,
SizeVector,
FloatVector,
m>
R
r =
R(
F,
a,
b,
n,
p,
e)
r
for the multi-dimensional integral
\[
r =
\int_{a[0]}^{b[0]} \cdots \int_{a[m-1]}^{b[m-1]}
\; F(x) \;
{\bf d} x_0 \cdots {\bf d} x_{m-1}
\; + \;
\sum_{i=0}^{m-1}
O \left[ ( b[i] - a[i] ) / 2^{n[i]-1} \right]^{2(p[i]+1)}
\]
cppad/romberg_mul.hpp
is included by cppad/cppad.hpp
but it can also be included separately with out the rest of
the CppAD
routines.
size_t
object with a value that can be determined at compile time; for example
2
.
It determines the dimension of the domain space for the integration.
Float
r
It is the estimate computed by RombergMul
for the integral above
(see description of Float
below).
Fun &
F
It must support the operation
F(
x)
The argument x to F has prototype
const
Float &
x
The return value of F is a Float object
const
FloatVector &
a
It specifies the lower limit for the integration
(see description of FloatVector
below).
const
FloatVector &
b
It specifies the upper limit for the integration.
const
SizeVector &
n
A total number of
2^{n[i]-1} + 1
evaluations of
F(
x)
are used to estimate the integral
with respect to
{\bf d} x_i
.
const
SizeVector &
p
For
i = 0 , \ldots , m-1
,
n[i]
determines the accuracy order in the
approximation for the integral
that is returned by RombergMul
.
The values in p must be less than or equal n; i.e.,
p[
i] <=
n[
i]
.
Float &
e
The input value of e does not matter
and its output value is an approximation for the absolute error in
the integral estimate.
x <
y
returns the bool
value true if x is less than
y and false otherwise.
cppad/romberg_mul.hpp
.