final double d = 2 * n + _c;
root = getInitialRootGuess(root, i, n, x);
root = ROOT_FINDER.getRoot(function, derivative, root);
x[i] = root;
w[i] = GAMMA_FUNCTION.evaluate(_alpha + n) * GAMMA_FUNCTION.evaluate(_beta + n) / MathUtils.factorialDouble(n) / GAMMA_FUNCTION.evaluate(n + _c + 1) * d * Math.pow(2, _c)
/ (derivative.evaluate(root) * previous.evaluate(root));
}
return new GaussianQuadratureData(x, w);
}
private double getInitialRootGuess(final double previousRoot, final int i, final int n, final double[] x) {