org.apache.commons.math3.analysis.integration.gauss

## Class LegendreRuleFactory

- java.lang.Object
- - org.apache.commons.math3.analysis.integration.gauss.BaseRuleFactory<Double>
  - - org.apache.commons.math3.analysis.integration.gauss.LegendreRuleFactory

    public class LegendreRuleFactory
    extends BaseRuleFactory<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 .

Since:
  3.1
Version:
  $Id: LegendreRuleFactory.java 1382197 2012-09-07 22:35:01Z erans $

### Constructor Summary

Constructors
Constructor and Description
`LegendreRuleFactory()`

### Method Summary

Methods
`protected Pair<Double[],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`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### LegendreRuleFactory

    public LegendreRuleFactory()

### Method Detail

#### computeRule

    protected Pair<Double[],Double[]> computeRule(int numberOfPoints)
                                           throws NotStrictlyPositiveException

Computes the rule for the given order.

Specified by:
  `computeRule` in class `BaseRuleFactory<Double>`
Parameters:
  `numberOfPoints` - Order of the rule to be computed.
Returns:
  the computed rule.
Throws:
  `NotStrictlyPositiveException`