30#include <nda/macros.hpp>
32namespace triqs::utility {
103 auto idx =
static_cast<unsigned int>(l_ % 2);
104 arr_[idx] = ((2 * l_ - 1) * x_ * arr_[1 - idx] - (l_ - 1) * arr_[idx]) / l_;
118 EXPECTS(x >= -1.0 and x <= 1.0);
128 std::array<double, 2> arr_{1.0, 0.0};
legendre_generator(double x=0.0)
Construct a Legendre polynomial generator at a given value .
void reset(double x)
Reset the generator to 0th order and with a new value.
double next()
Increase the degree of the polynomial from to using .
std::complex< double > legendre_T(int n, int l)
Get the quantity from Eq.(E2) in the paper https://doi.org/10.1103/PhysRevB.84.075145.
double mod_cyl_bessel_i(int n, double x)
Get the modified spherical bessel function of the first kind of order evaluated at .
double legendre_t(int l, int p)
Get the quantity from Eq.(E8) in the paper https://doi.org/10.1103/PhysRevB.84.075145.