public class Romberg extends Object implements Integrator
| Constructor and Description |
|---|
Romberg(IterativeIntegrator integrator)
Extend an integrator using Romberg's method.
|
| Modifier and Type | Method and Description |
|---|---|
double |
getPrecision()
Get the convergence threshold.
|
double |
integrate(UnivariateRealFunction f,
double a,
double b)
Integrate function f from a to b,
\[
\int_a^b\! f(x)\, dx
\]
|
public Romberg(IterativeIntegrator integrator)
integrator - an iterative integrator that must do at least 2 iterationspublic double integrate(UnivariateRealFunction f, double a, double b)
Integratorintegrate in interface Integratorf - a univariate functiona - the lower limitb - the upper limitpublic double getPrecision()
IntegratorIterativeIntegrator,
the integral is considered converged if the relative error of two successive sums is less than the threshold.getPrecision in interface IntegratorCopyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.