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()
GaussianQuadratureRule
getEvaluationPoints
in interface GaussianQuadratureRule
public double[] getCoefficients()
GaussianQuadratureRule
getCoefficients
in interface GaussianQuadratureRule
public double getWeighting(double x)
GaussianQuadratureRule
getWeighting
in interface GaussianQuadratureRule
x
- the evaluation pointpublic boolean supportsInterval(double a, double b)
GaussianQuadratureRule
supportsInterval
in interface GaussianQuadratureRule
a
- 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.