(out) user-allocated quadrature nodes in ascending order length of N
(out) user-allocated corresponding quadrature weights length of N
(temp) user-allocated workspace length of greate or equal to (N + 1) ^^ 2
(optional) parameter '> -1'
0 on success, xSTEQR LAPACK code on numerical error.
import mir.math.common; auto n = 5; auto x = new double[n]; auto w = new double[n]; auto work = new double[(n + 1) ^^ 2]; gaussLaguerreQuadrature(x, w, work); static immutable xc = [ 0.26356032, 1.41340306, 3.59642577, 7.08581001, 12.64080084]; static immutable wc = [5.21755611e-01, 3.98666811e-01, 7.59424497e-02, 3.61175868e-03, 2.33699724e-05]; foreach (i; 0 .. n) { assert(x[i].approxEqual(xc[i])); assert(w[i].approxEqual(wc[i])); }
Gauss-Laguerre Quadrature