Legendre¶
The \(n \times n\) tridiagonal Jacobi matrix associated with the Legendre polynomials. Its main diagonal is zero, and the off-diagonal terms are given by
\[\beta_j = \frac{1}{2}\left(1-(2(j+1))^{-2}\right)^{-1/2},\]
where \(\beta_j\) connects the \(j\)’th degree of freedom to the \(j+1\)’th degree of freedom, counting from zero. The eigenvalues of this matrix lie in \([-1,1]\) and are the locations for Gaussian quadrature of order \(n\). The corresponding weights may be found by doubling the square of the first entry of the corresponding normalized eigenvector.
C++ API¶
-
void
Legendre
(AbstractDistMatrix<F> &A, Int n)¶ Sets the matrix
A
equal to the \(n \times n\) Jacobi matrix.