Class LegendreHighPrecisionRuleFactory
- java.lang.Object
-
- org.hipparchus.analysis.integration.gauss.BaseRuleFactory<BigDecimal>
-
- org.hipparchus.analysis.integration.gauss.LegendreHighPrecisionRuleFactory
-
public class LegendreHighPrecisionRuleFactory extends BaseRuleFactory<BigDecimal>
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.
-
-
Constructor Summary
Constructors Constructor Description LegendreHighPrecisionRuleFactory()
Default precision isDECIMAL128
.LegendreHighPrecisionRuleFactory(MathContext mContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Pair<BigDecimal[],BigDecimal[]>
computeRule(int numberOfPoints)
Computes the rule for the given order.-
Methods inherited from class org.hipparchus.analysis.integration.gauss.BaseRuleFactory
addRule, getRule, getRuleInternal
-
-
-
-
Constructor Detail
-
LegendreHighPrecisionRuleFactory
public LegendreHighPrecisionRuleFactory()
Default precision isDECIMAL128
.
-
LegendreHighPrecisionRuleFactory
public LegendreHighPrecisionRuleFactory(MathContext mContext)
- Parameters:
mContext
- Precision setting for computing the quadrature rules.
-
-
Method Detail
-
computeRule
protected Pair<BigDecimal[],BigDecimal[]> computeRule(int numberOfPoints) throws MathIllegalArgumentException
Computes the rule for the given order.- Specified by:
computeRule
in classBaseRuleFactory<BigDecimal>
- Parameters:
numberOfPoints
- Order of the rule to be computed.- Returns:
- the computed rule.
- Throws:
MathIllegalArgumentException
- if the elements of the pair do not have the same length.
-
-