public class GaussianQuadrature extends Object implements Integrator
Integrator.getPrecision()
will throw an UnsupportedOperationException
.Constructor and Description |
---|
GaussianQuadrature(GaussianQuadratureRule rule)
Create a Gaussian quadrature integrator with the given quadrature rule.
|
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 GaussianQuadrature(GaussianQuadratureRule rule)
rule
- the Gaussian quadrature rulepublic double integrate(UnivariateRealFunction f, double a, double b)
Integrator
integrate
in interface Integrator
f
- a univariate functiona
- the lower limitb
- the upper limitpublic double getPrecision()
Integrator
IterativeIntegrator
,
the integral is considered converged if the relative error of two successive sums is less than the threshold.getPrecision
in interface Integrator
Copyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.