public class Integral extends Object
Constructor and Description |
---|
Integral(Function f,
double lo,
double hi)
Constructs an integral with given bounds.
|
Integral(Function f,
double lo,
double hi,
double flo,
double fhi)
Constructs an integral with given bounds and supplied function
evaluations.
|
Integral(Function f,
Integral[] subs)
Constructs an integral with a number of sub-integrals
covering the interval of interest.
|
Modifier and Type | Method and Description |
---|---|
int |
count()
Returns the number of nodes whose recursive data provides the
output of this integral function.
|
void |
fill(double tol)
Recursively populates the child nodes of this integral so as
to achieve a given tolerance in calculation accuracy.
|
static NumericFunction |
integrate(Function f,
double[] points,
double tol)
Adaptively integrates a given function with the calculation
broken up into sub-intervals at supplied points.
|
int |
store(double[] x,
double[] y,
int index)
Flattens the recursive information contained by this integral
into a pair of arrays represting (x,y) samples giving the
antiderivative function.
|
public Integral(Function f, double lo, double hi, double flo, double fhi)
f
- function to integratelo
- lower bound of integration intervalhi
- upper bound of integration intervalflo
- function evaluattion at lo
fhi
- function evaluattion at hi
public Integral(Function f, double lo, double hi)
f
- function to integratelo
- lower bound of integration intervalhi
- upper bound of integration intervalpublic Integral(Function f, Integral[] subs)
f
- function to integratesubs
- contiguous sub-intervals;
it is the responsibility of the caller to
populate these with their own recursive sub-intervals
as requiredpublic void fill(double tol)
tol
- tolerancepublic int count()
public int store(double[] x, double[] y, int index)
x
- array to populate with X valuesy
- array to populate with Y (integrated) valuesindex
- index of the x
and y
arrays from which the results should be insertedpublic static NumericFunction integrate(Function f, double[] points, double tol)
f
- function to integratepoints
- ordered list of samples on X axis at which
evaluations will be forcedtol
- tolerance parameter controlling recursionf
over the range given by the first and last elements
of points
Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.