TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
Loading...
Searching...
No Matches
triqs::utility::legendre_generator

#include <triqs/utility/legendre.hpp>

Detailed Description

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.

Constructor & Destructor Documentation

◆ legendre_generator()

triqs::utility::legendre_generator::legendre_generator ( double x = 0.0)
inline

Construct a Legendre polynomial generator at a given value \( x \).

Parameters
xValue \( x \) at which to evaluate the Legendre polynomials.

Definition at line 93 of file legendre.hpp.

Member Function Documentation

◆ next()

double triqs::utility::legendre_generator::next ( )
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) \).

Returns
Value of the lth order Legendre polynomial evaluated at \( x \).

Definition at line 101 of file legendre.hpp.

◆ reset()

void triqs::utility::legendre_generator::reset ( double x)
inline

Reset the generator to 0th order and with a new \( x \) value.

Parameters
xValue \( x \) at which to evaluate the Legendre polynomials.

Definition at line 117 of file legendre.hpp.


The documentation for this class was generated from the following file: