org.apache.commons.math3.analysis.integration.gauss
Class LegendreParametricTest
java.lang.Object
org.apache.commons.math3.analysis.integration.gauss.GaussianQuadratureAbstractTest
org.apache.commons.math3.analysis.integration.gauss.LegendreParametricTest
public class LegendreParametricTest
- extends GaussianQuadratureAbstractTest
Test of the LegendreRuleFactory.
This parameterized test extends the standard test for Gaussian quadrature
rule, where each monomial is tested in turn.
Parametrization allows to test automatically 0, 1, ... , MAX_NUM_POINTS
quadrature rules.
- Version:
- $Id$
|
Field Summary |
static int |
MAX_NUM_POINTS
The highest order quadrature rule to be tested. |
|
Constructor Summary |
LegendreParametricTest(int numberOfPoints,
int maxDegree,
double eps,
double numUlps)
Creates a new instance of this test, with the specified number of nodes
for the Gauss-Legendre quadrature rule. |
|
Method Summary |
double |
getExpectedValue(int n)
Returns the expected value of the integral of the specified monomial. |
static Collection<Object[]> |
getParameters()
Returns the collection of parameters to be passed to the constructor of
this class. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MAX_NUM_POINTS
public static final int MAX_NUM_POINTS
- The highest order quadrature rule to be tested.
- See Also:
- Constant Field Values
LegendreParametricTest
public LegendreParametricTest(int numberOfPoints,
int maxDegree,
double eps,
double numUlps)
- Creates a new instance of this test, with the specified number of nodes
for the Gauss-Legendre quadrature rule.
- Parameters:
numberOfPoints - Order of integration rule.maxDegree - Maximum degree of monomials to be tested.eps - Value of ε.numUlps - Value of the maximum relative error (in ulps).
getParameters
public static Collection<Object[]> getParameters()
- Returns the collection of parameters to be passed to the constructor of
this class.
Gauss-Legendre quadrature rules of order 1, ...,
MAX_NUM_POINTS
will be constructed.
- Returns:
- the collection of parameters for this parameterized test.
getExpectedValue
public double getExpectedValue(int n)
- Description copied from class:
GaussianQuadratureAbstractTest
- Returns the expected value of the integral of the specified monomial.
The integration is carried out on the natural interval of the quadrature
rule under test.
- Specified by:
getExpectedValue in class GaussianQuadratureAbstractTest
- Parameters:
n - Degree of the monomial.
- Returns:
- the expected value of the integral of xn.
Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.