E.V.E
v2023.02.15
 
Loading...
Searching...
No Matches

◆ laguerre

auto eve::laguerre = functor<laguerre_t>
inlineconstexpr
  • The Laguerre polynomial of order n is given by \(\displaystyle \mbox{L}_{n}(x) = \frac{e^x}{n!}\frac{d^n}{dx^n}(x^ne^{-x})\).
  • The associated laguerre polynomial is given by \(\displaystyle \mbox{L}_{n}^{m} = (-1)^m\frac{d^m}{dx^m}\mbox{L}_{n+m}(x)\).

Header file

#include <eve/module/polynomial.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto laguerre(integral_value auto n, floating_value auto x) noexcept; //1
// Semantic options
constexpr auto laguerre[associated](integral_value auto n, integral_value auto m,
floating_value auto x) noexcept; // 2
constexpr auto laguerre[successor](integral_value auto n,
integral_value auto ln, integral_value auto lnm1) noexcept; // 3
constexpr auto laguerre[successor](integral_value auto n, integral_value auto l,
integral_value auto ln, integral_value auto lnm1) noexcept; // 3
constexpr auto laguerre[associated][successor](integral_value auto n,
integral_value auto m, floating_value auto x) noexcept; // 4
}
The concept floating_value<T> is satisfied if and only if T satisfies eve::value and the element type...
Definition value.hpp:116
The concept integral_value<T> is satisfied if and only if T satisfies eve::value and the element type...
Definition value.hpp:51
constexpr auto laguerre
strict_elementwise_callable object computing the value of the Laguerre and associated Laguerre polyno...
Definition laguerre.hpp:99
EVE Main Namespace.
Definition abi.hpp:18

Parameters

Return value

  1. The value of the Laguerre polynomial of order n at x is returned.
  2. The value of the associated Laguerre polynomial of orders n, m at x is returned. constexpr auto legendre(integral_value auto n, floating_value auto x) noexcept; //1
  3. implements the three term recurrence relation for the Laguerre polynomials, \(\displaystyle \mbox{L}_{n+1} = \left((2n+1-x)\mbox{L}_{n}-n\mbox{L}_{n-1}\right)/(n+1)\)
  4. implements the three term recurrence relation for the associated Laguerre polynomials, \(\displaystyle \mbox{L}_{n+1}^m = \left((m+2n+1-x)\mbox{L}_{n}^{m}-(m+n)\mbox{L}_{n-1}^{m}\right)/(n+1)\)

External references

Example

#include <eve/module/polynomial.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
wide_ft xd = {0.5, -1.5, 0.1, -1.0, 19.0, 25.0, 21.5, 10000.0};
wide_it n = {0, 1, 2, 3, 4, 5, 6, 7};
wide_ft x(0.5);
std::cout << "---- simd" << '\n'
<< "<- xd = " << xd << '\n'
<< "<- n = " << n << '\n'
<< "<- x = " << x << '\n'
<< "-> laguerre(n, xd) = " << eve::laguerre(n, xd) << '\n'
<< "-> laguerre(3, xd) = " << eve::laguerre(3, xd) << '\n'
<< "-> laguerre(n, 0.5) = " << eve::laguerre(n, 0.5) << '\n'
<< "-> laguerre(n, x) = " << eve::laguerre(n, x) << '\n';
double xs = 3.0;
std::cout << "---- scalar" << '\n'
<< "<- xs = " << xs << '\n'
<< "-> laguerre(4, xs) = " << eve::laguerre(4, xs) << '\n';
return 0;
}
Wrapper for SIMD registers.
Definition wide.hpp:86