Class LegendreRuleFactory
- java.lang.Object
-
- org.apache.commons.math3.analysis.integration.gauss.BaseRuleFactory<java.lang.Double>
-
- org.apache.commons.math3.analysis.integration.gauss.LegendreRuleFactory
-
public class LegendreRuleFactory extends BaseRuleFactory<java.lang.Double>
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
-
-
Constructor Summary
Constructors Constructor Description LegendreRuleFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Pair<java.lang.Double[],java.lang.Double[]>
computeRule(int numberOfPoints)
Computes the rule for the given order.-
Methods inherited from class org.apache.commons.math3.analysis.integration.gauss.BaseRuleFactory
addRule, getRule, getRuleInternal
-
-
-
-
Method Detail
-
computeRule
protected Pair<java.lang.Double[],java.lang.Double[]> computeRule(int numberOfPoints) throws DimensionMismatchException
Computes the rule for the given order.- Specified by:
computeRule
in classBaseRuleFactory<java.lang.Double>
- Parameters:
numberOfPoints
- Order of the rule to be computed.- Returns:
- the computed rule.
- Throws:
DimensionMismatchException
- if the elements of the pair do not have the same length.
-
-