org.apache.commons.math3.analysis.integration.gauss
public class GaussIntegratorFactory extends Object
Gaussian integration rule
.Modifier and Type | Field and Description |
---|---|
private BaseRuleFactory<Double> |
legendre
Generator of Gauss-Legendre integrators.
|
private BaseRuleFactory<BigDecimal> |
legendreHighPrecision
Generator of Gauss-Legendre integrators.
|
Constructor and Description |
---|
GaussIntegratorFactory() |
Modifier and Type | Method and Description |
---|---|
private static Pair<double[],double[]> |
getRule(BaseRuleFactory<? extends Number> factory,
int numberOfPoints) |
GaussIntegrator |
legendre(int numberOfPoints)
Creates an integrator of the given order, and whose call to the
integrate method will perform an integration on the natural interval
[-1 , 1] . |
GaussIntegrator |
legendre(int numberOfPoints,
double lowerBound,
double upperBound)
Creates an integrator of the given order, and whose call to the
integrate method will perform an integration on the given interval. |
GaussIntegrator |
legendreHighPrecision(int numberOfPoints)
Creates an integrator of the given order, and whose call to the
integrate method will perform an integration on the natural interval
[-1 , 1] . |
GaussIntegrator |
legendreHighPrecision(int numberOfPoints,
double lowerBound,
double upperBound)
Creates an integrator of the given order, and whose call to the
integrate method will perform an integration on the given interval. |
private static Pair<double[],double[]> |
transform(Pair<double[],double[]> rule,
double a,
double b)
Performs a change of variable so that the integration can be performed
on an arbitrary interval
[a, b] . |
private final BaseRuleFactory<Double> legendre
private final BaseRuleFactory<BigDecimal> legendreHighPrecision
public GaussIntegrator legendre(int numberOfPoints)
integrate
method will perform an integration on the natural interval
[-1 , 1]
.numberOfPoints
- Order of the integration rule.public GaussIntegrator legendre(int numberOfPoints, double lowerBound, double upperBound)
integrate
method will perform an integration on the given interval.numberOfPoints
- Order of the integration rule.lowerBound
- Lower bound of the integration interval.upperBound
- Upper bound of the integration interval.public GaussIntegrator legendreHighPrecision(int numberOfPoints)
integrate
method will perform an integration on the natural interval
[-1 , 1]
.numberOfPoints
- Order of the integration rule.public GaussIntegrator legendreHighPrecision(int numberOfPoints, double lowerBound, double upperBound)
integrate
method will perform an integration on the given interval.numberOfPoints
- Order of the integration rule.lowerBound
- Lower bound of the integration interval.upperBound
- Upper bound of the integration interval.private static Pair<double[],double[]> getRule(BaseRuleFactory<? extends Number> factory, int numberOfPoints)
factory
- Integration rule factory.numberOfPoints
- Order of the integration rule.private static Pair<double[],double[]> transform(Pair<double[],double[]> rule, double a, double b)
[a, b]
.
It is assumed that the natural interval is [-1, 1]
.rule
- Original points and weights.a
- Lower bound of the integration interval.b
- Lower bound of the integration interval.Copyright (c) 2003-2013 Apache Software Foundation