public class LegendreRule extends Object implements GaussianQuadratureRule
| Constructor and Description |
|---|
LegendreRule(int n)
Create a Legendre rule of the given order.
|
| Modifier and Type | Method and Description |
|---|---|
double[] |
getCoefficients()
Get the coefficients \(c_i\) associated with each evaluation point \(x_i\).
|
double[] |
getEvaluationPoints()
Get the evaluation points for the quadrature rule (\(x_i\)).
|
double |
getWeighting(double x)
Get the weighting \(w(x_i)\) associated with a point \(x_i\).
|
boolean |
supportsInterval(double a,
double b)
Return whether the given interval (a,b) is supported by this rule.
|
public LegendreRule(int n)
n - the number of points in the quadrature rulepublic double[] getEvaluationPoints()
GaussianQuadratureRulegetEvaluationPoints in interface GaussianQuadratureRulepublic double[] getCoefficients()
GaussianQuadratureRulegetCoefficients in interface GaussianQuadratureRulepublic double getWeighting(double x)
GaussianQuadratureRulegetWeighting in interface GaussianQuadratureRulex - the evaluation pointpublic boolean supportsInterval(double a,
double b)
GaussianQuadratureRulesupportsInterval in interface GaussianQuadratureRulea - the start point of the intervalb - the end point of the intervaltrue if the interval is supportedCopyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.