To secure a numerically stable computation of the matrix G, the Gegenbauer polynomials are evaluated with the aid of their recurrence relation (12).
For each of the N (N+1)/2 matrix entries which have to be computed we need 3 arithmetic operations for the scalar products of the vectors and and arithmetic operations for the evaluation of the Gegenbauer-polynomials using the recurrence relation (12). Thus, the computation of G requires arithmetic operations. Because of the symmetry of G we used Cholesky-decomposition to solve the system of equations (13). This requires operations. The calculation of the weights therefore needs arithmetic operations.