Anonymous user
Numerical integration/Gauss-Legendre Quadrature: Difference between revisions
Numerical integration/Gauss-Legendre Quadrature (view source)
Revision as of 19:45, 7 October 2012
, 11 years agoUpdated D entry
m (Updated D entry) |
(Updated D entry) |
||
Line 229:
immutable struct GaussLegendreQuadrature(size_t N, FP=double,
size_t NBITS=50) {
alias FP[N + 1][N + 1] CoefMat;
Line 241:
pure nothrow {
lcoef[0][0] = lcoef[1][1] = 1;
foreach (int n; 2 .. N + 1) { // n must be signed.
lcoef[n][0] = -(n - 1) * lcoef[n - 2][0] / n;
foreach (i; 1 .. n + 1)
|