Top Description Fields Constructors Methods
org.apache.commons.math3.analysis.integration.gauss

public Class HermiteRuleFactory

extends BaseRuleFactory<Double>
Class Inheritance
Imports
org.apache.commons.math3.exception.DimensionMismatchException, org.apache.commons.math3.util.Pair, .FastMath

Factory that creates a Gauss-type quadrature rule using Hermite polynomials of the first kind. Such a quadrature rule allows the calculation of improper integrals of a function

\(f(x) e^{-x^2}\)

Recurrence relation and weights computation follow Abramowitz and Stegun, 1964.

The coefficients of the standard Hermite polynomials grow very rapidly. In order to avoid overflows, each Hermite polynomial is normalized with respect to the underlying scalar product. The initial interval for the application of the bisection method is based on the roots of the previous Hermite polynomial (interlacing). Upper and lower bounds of these roots are provided by

I. Krasikov, Nonnegative quadratic forms and bounds on orthogonal polynomials, Journal of Approximation theory 111, 31-49
Since
3.3

Field Summary

Modifier and TypeField and Description
private static final double
H0

π-1/4

private static final double
H1

π-1/4 √2

private static final double
SQRT_PI

π1/2

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected Pair<Double[], Double[]>
computeRule(int
Order of the rule to be computed.
numberOfPoints
)

Implements abstract org.apache.commons.math3.analysis.integration.gauss.BaseRuleFactory.computeRule.

Computes the rule for the given order.

Inherited from org.apache.commons.math3.analysis.integration.gauss.BaseRuleFactory:
addRulegetRulegetRuleInternal

Field Detail

H0back to summary
private static final double H0

π-1/4

H1back to summary
private static final double H1

π-1/4 √2

SQRT_PIback to summary
private static final double SQRT_PI

π1/2

Constructor Detail

HermiteRuleFactoryback to summary
public HermiteRuleFactory()

Method Detail

computeRuleback to summary
protected Pair<Double[], Double[]> computeRule(int numberOfPoints) throws DimensionMismatchException

Implements abstract org.apache.commons.math3.analysis.integration.gauss.BaseRuleFactory.computeRule.

Doc from org.apache.commons.math3.analysis.integration.gauss.BaseRuleFactory.computeRule.

Computes the rule for the given order.

Parameters
numberOfPoints:int

Order of the rule to be computed.

Returns:Pair<Double[], Double[]>

the computed rule.

Annotations
@Override
Exceptions
DimensionMismatchException:
if the elements of the pair do not have the same length.