### Question:
GaussLaguerreWeightAndAbscissaFunction implements QuadratureWeightAndAbscissaFunction { @Override public GaussianQuadratureData generate(int n) { ArgChecker.isTrue(n > 0); Pair<DoubleFunction1D, DoubleFunction1D>[] polynomials = LAGUERRE.getPolynomialsAndFirstDerivative(n, _alpha); Pair<DoubleFunction1D, DoubleFunction1D> pair = polynomials[n]; DoubleFunction1D p1 = polynomials[n - 1].getFirst(); DoubleFunction1D function = pair.getFirst(); DoubleFunction1D derivative = pair.getSecond(); double[] x = new double[n]; double[] w = new double[n]; double root = 0; for (int i = 0; i < n; i++) { root = ROOT_FINDER.getRoot(function, derivative, getInitialRootGuess(root, i, n, x)); x[i] = root; w[i] = -GAMMA_FUNCTION.applyAsDouble(_alpha + n) / CombinatoricsUtils.factorialDouble(n) / (derivative.applyAsDouble(root) * p1.applyAsDouble(root)); } return new GaussianQuadratureData(x, w); } GaussLaguerreWeightAndAbscissaFunction();  GaussLaguerreWeightAndAbscissaFunction(double alpha); @Override GaussianQuadratureData generate(int n);  }### Answer:
@Test public void test() { assertResults(F.generate(2), X2, W2); assertResults(F.generate(3), X3, W3); assertResults(F.generate(4), X4, W4); assertResults(F.generate(5), X5, W5); }