|
TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
|
#include <triqs/utility/legendre.hpp>
Recursive generation of Legendre polynomials \( P_l(x) \).
Legendre polynomials are defined on the interval \( [-1, 1] \). They form an orthogonal basis with respect to the inner product
\[ \langle P_k, P_l \rangle = \int_{-1}^1 P_k(x) P_l(x) dx = \frac{2}{2l + 1} \delta_{kl} \; . \]
The recurrence relation is given by
\[ (l + 1) P_{l+1}(x) = (2l + 1) x P_l(x) - l P_{l-1}(x) \; , \]
with \( P_0(x) = 1 \) and \( P_1(x) = x \).
See Wikipedia for more information.
Definition at line 87 of file legendre.hpp.
Public Member Functions | |
| legendre_generator (double x=0.0) | |
| Construct a Legendre polynomial generator at a given value \( x \). | |
| double | next () |
| Increase the degree of the polynomial from \( l \) to \( l + 1 \) using \( (l + 1) P_{l+1}(x) =
(2l + 1) x P_l(x) - l P_{l-1}(x) \). | |
| void | reset (double x) |
| Reset the generator to 0th order and with a new \( x \) value. | |
|
inline |
Construct a Legendre polynomial generator at a given value \( x \).
| x | Value \( x \) at which to evaluate the Legendre polynomials. |
Definition at line 93 of file legendre.hpp.
|
inline |
Increase the degree of the polynomial from \( l \) to \( l + 1 \) using \( (l + 1) P_{l+1}(x) = (2l + 1) x P_l(x) - l P_{l-1}(x) \).
Definition at line 101 of file legendre.hpp.
|
inline |
Reset the generator to 0th order and with a new \( x \) value.
| x | Value \( x \) at which to evaluate the Legendre polynomials. |
Definition at line 117 of file legendre.hpp.