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

public Class LegendreHighPrecisionRuleFactory

extends BaseRuleFactory<BigDecimal>
Class Inheritance
Imports
java.math.BigDecimal, .MathContext, org.apache.commons.math3.exception.DimensionMismatchException, org.apache.commons.math3.util.Pair

Factory that creates Gauss-type quadrature rule using Legendre polynomials. In this implementation, the lower and upper bounds of the natural interval of integration are -1 and 1, respectively. The Legendre polynomials are evaluated using the recurrence relation presented in Abramowitz and Stegun, 1964.
Since
3.1

Field Summary

Modifier and TypeField and Description
private final MathContext
mContext

Settings for enhanced precision computations.

private final BigDecimal
minusOne

The number -1.

private final BigDecimal
oneHalf

The number 0.5.

private final BigDecimal
two

The number 2.

Constructor Summary

AccessConstructor and Description
public
public
LegendreHighPrecisionRuleFactory(MathContext
Precision setting for computing the quadrature rules.
mContext
)

Method Summary

Modifier and TypeMethod and Description
protected Pair<BigDecimal[], BigDecimal[]>
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

mContextback to summary
private final MathContext mContext

Settings for enhanced precision computations.

minusOneback to summary
private final BigDecimal minusOne

The number -1.

oneHalfback to summary
private final BigDecimal oneHalf

The number 0.5.

twoback to summary
private final BigDecimal two

The number 2.

Constructor Detail

LegendreHighPrecisionRuleFactoryback to summary
public LegendreHighPrecisionRuleFactory()

Default precision is DECIMAL128.

LegendreHighPrecisionRuleFactoryback to summary
public LegendreHighPrecisionRuleFactory(MathContext mContext)
Parameters
mContext:MathContext

Precision setting for computing the quadrature rules.

Method Detail

computeRuleback to summary
protected Pair<BigDecimal[], BigDecimal[]> 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<BigDecimal[], BigDecimal[]>

the computed rule.

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