Theoretica
A C++ numerical and automatic mathematical library
orthogonal.h File Reference

Orthogonal polynomial bases. More...

#include "./polynomial.h"
#include "../optimization/roots.h"
#include <functional>

Go to the source code of this file.

Namespaces

 theoretica
 Main namespace of the library which contains all functions and objects.
 

Typedefs

using theoretica::polyn_recurr_formula = std::function< polynomial< real >(polynomial< real >, polynomial< real >, unsigned int)>
 Polynomial sequence recurrence formula type Used for computing orthogonal polynomial basis elements.
 

Functions

polynomial< real > theoretica::gen_polyn_recurr (polynomial< real > P0, polynomial< real > P1, polyn_recurr_formula f, unsigned int n)
 Generate a polynomial basis using a recursion formula. More...
 
polynomial< real > theoretica::legendre_polyn_recurr (polynomial< real > P0, polynomial< real > P1, unsigned int l)
 Recursion formula for Legendre polynomials.
 
polynomial< real > theoretica::legendre_polynomial (unsigned int n)
 Compute the nth Legendre polynomial. More...
 
real theoretica::legendre_polyn_normalization (unsigned int n)
 Normalization constant for the nth Legendre polynomial.
 
std::function< real(real)> theoretica::assoc_legendre_polynomial (unsigned int l, int m)
 
polynomial< real > theoretica::assoc_legendre_polynomial_even (unsigned int l, int m)
 
polynomial< real > theoretica::laguerre_polyn_recurr (polynomial< real > L0, polynomial< real > L1, unsigned int i)
 Recursion formula for Laguerre polynomials.
 
polynomial< real > theoretica::laguerre_polynomial (unsigned int n)
 Compute the nth Laguerre polynomial.
 
polynomial< real > theoretica::general_laguerre_polyn_recurr (polynomial< real > L0, polynomial< real > L1, real alpha, unsigned int i)
 Recursion formula for Generalized Laguerre polynomials.
 
polynomial< real > theoretica::general_laguerre_polynomial (real alpha, unsigned int n)
 Compute the nth Laguerre polynomial.
 
polynomial< real > theoretica::hermite_polyn_recurr (polynomial< real > H0, polynomial< real > H1, unsigned int i)
 Recursion formula for Hermite polynomials.
 
polynomial< real > theoretica::hermite_polynomial (unsigned int n)
 Compute the nth Hermite polynomial. More...
 
real theoretica::hermite_polyn_normalization (unsigned int n)
 Normalization constant for the nth Hermite polynomial.
 
polynomial< real > theoretica::chebyshev_polyn_recurr (polynomial< real > T0, polynomial< real > T1, unsigned int i)
 Recursion formula for Chebyshev polynomials The formula is the same for first and second kind polynomials.
 
polynomial< real > theoretica::chebyshev1_polynomial (unsigned int n)
 Compute the nth Chebyshev polynomial of the first kind. More...
 
polynomial< real > theoretica::chebyshev2_polynomial (unsigned int n)
 Compute the nth Chebyshev polynomial of the second kind. More...
 
std::vector< real > theoretica::legendre_roots (unsigned int n)
 Roots of the n-th Legendre polynomial. More...
 
std::vector< real > theoretica::legendre_weights (const std::vector< real > &roots)
 Legendre weights for Gauss-Legendre quadrature of n-th order. More...
 
std::vector< real > theoretica::laguerre_weights (const std::vector< real > &roots)
 Laguerre weights for Gauss-Laguerre quadrature of n-th order. More...
 
std::vector< real > theoretica::hermite_weights (const std::vector< real > &roots)
 Hermite weights for Gauss-Hermite quadrature of n-th order. More...
 

Detailed Description

Orthogonal polynomial bases.