Deprecated
As of 3.1 (to be removed in 4.0). Please use
IterativeLegendreGaussIntegrator instead.
Legendre-Gauss integrators are efficient integrators that can accurately integrate functions with few function evaluations. A Legendre-Gauss integrator using an n-points quadrature formula can integrate 2n-1 degree polynomials exactly.
These integrators evaluate the function on n carefully chosen abscissas in each step interval (mapped to the canonical [-1,1] interval). The evaluation abscissas are not evenly spaced and none of them are at the interval endpoints. This implies the function integrated can be undefined at integration interval endpoints.
The evaluation abscissas xi are the roots of the degree n Legendre polynomial. The weights ai of the quadrature formula integrals from -1 to +1 ∫ Li2 where Li (x) = ∏ (x-xk)/(xi-xk) for k != i.
| Modifier and Type | Field and Description |
|---|---|
| private final double[] | abscissas
Abscissas for the current method. |
| private static final double[] | ABSCISSAS_2
Abscissas for the 2 points method. |
| private static final double[] | ABSCISSAS_3
Abscissas for the 3 points method. |
| private static final double[] | ABSCISSAS_4
Abscissas for the 4 points method. |
| private static final double[] | ABSCISSAS_5
Abscissas for the 5 points method. |
| private final double[] | weights
Weights for the current method. |
| private static final double[] | WEIGHTS_2
Weights for the 2 points method. |
| private static final double[] | WEIGHTS_3
Weights for the 3 points method. |
| private static final double[] | WEIGHTS_4
Weights for the 4 points method. |
| private static final double[] | WEIGHTS_5
Weights for the 5 points method. |
| Access | Constructor and Description |
|---|---|
| public | LegendreGaussIntegrator(final int
number of points desired (must be between 2 and 5 inclusive) n, final double relative accuracy of the result relativeAccuracy, final double absolute accuracy of the result absoluteAccuracy, final int minimum number of iterations minimalIterationCount, final int maximum number of iterations maximalIterationCount)Build a Legendre-Gauss integrator with given accuracies and iterations counts. |
| public | LegendreGaussIntegrator(final int
number of points desired (must be between 2 and 5 inclusive) n, final double relative accuracy of the result relativeAccuracy, final double absolute accuracy of the result absoluteAccuracy)Build a Legendre-Gauss integrator with given accuracies. |
| public | LegendreGaussIntegrator(final int
number of points desired (must be between 2 and 5 inclusive) n, final int minimum number of iterations minimalIterationCount, final int maximum number of iterations maximalIterationCount)Build a Legendre-Gauss integrator with given iteration counts. |
| Modifier and Type | Method and Description |
|---|---|
| protected double | doIntegrate()
Implements abstract org. Method for implementing actual integration algorithms in derived classes. |
| private double | Returns: the value of n-th stage integralnumber of steps n)Compute the n-th stage integral. |
| abscissas | back to summary |
|---|---|
| private final double[] abscissas Abscissas for the current method. | |
| ABSCISSAS_2 | back to summary |
|---|---|
| private static final double[] ABSCISSAS_2 Abscissas for the 2 points method. | |
| ABSCISSAS_3 | back to summary |
|---|---|
| private static final double[] ABSCISSAS_3 Abscissas for the 3 points method. | |
| ABSCISSAS_4 | back to summary |
|---|---|
| private static final double[] ABSCISSAS_4 Abscissas for the 4 points method. | |
| ABSCISSAS_5 | back to summary |
|---|---|
| private static final double[] ABSCISSAS_5 Abscissas for the 5 points method. | |
| weights | back to summary |
|---|---|
| private final double[] weights Weights for the current method. | |
| WEIGHTS_2 | back to summary |
|---|---|
| private static final double[] WEIGHTS_2 Weights for the 2 points method. | |
| WEIGHTS_3 | back to summary |
|---|---|
| private static final double[] WEIGHTS_3 Weights for the 3 points method. | |
| WEIGHTS_4 | back to summary |
|---|---|
| private static final double[] WEIGHTS_4 Weights for the 4 points method. | |
| WEIGHTS_5 | back to summary |
|---|---|
| private static final double[] WEIGHTS_5 Weights for the 5 points method. | |
| LegendreGaussIntegrator | back to summary |
|---|---|
| public LegendreGaussIntegrator(final int n, final double relativeAccuracy, final double absoluteAccuracy, final int minimalIterationCount, final int maximalIterationCount) throws MathIllegalArgumentException, NotStrictlyPositiveException, NumberIsTooSmallException Build a Legendre-Gauss integrator with given accuracies and iterations counts.
| |
| LegendreGaussIntegrator | back to summary |
|---|---|
| public LegendreGaussIntegrator(final int n, final double relativeAccuracy, final double absoluteAccuracy) throws MathIllegalArgumentException Build a Legendre-Gauss integrator with given accuracies.
| |
| LegendreGaussIntegrator | back to summary |
|---|---|
| public LegendreGaussIntegrator(final int n, final int minimalIterationCount, final int maximalIterationCount) throws MathIllegalArgumentException Build a Legendre-Gauss integrator with given iteration counts.
| |
| doIntegrate | back to summary |
|---|---|
| protected double doIntegrate() throws MathIllegalArgumentException, TooManyEvaluationsException, MaxCountExceededException Implements abstract org. Doc from org. Method for implementing actual integration algorithms in derived classes.
| |
| stage | back to summary |
|---|---|
| private double stage(final int n) throws TooManyEvaluationsException Compute the n-th stage integral.
| |