Laguerre polynomials
Loading...
Searching...
No Matches
Laguerre::Original< T > Class Template Reference

#include <Laguerre.h>

Inheritance diagram for Laguerre::Original< T >:
BaseSolver< T >

Public Member Functions

 Original ()
 
void operator() (std::vector< T > &poly, std::vector< std::complex< T > > &roots, std::vector< int > &conv, int itmax=80) override
 Find the roots of a polynomial using Laguerre's method.
 

Private Member Functions

void laguer (const std::vector< std::complex< T > > &a, std::complex< T > &x, int &converged, int itmax)
 Laguerre's method to find a root of a polynomial.
 

Static Private Attributes

static constexpr T eps = std::numeric_limits<T>::epsilon()
 

Constructor & Destructor Documentation

◆ Original()

template<typename T >
Laguerre::Original< T >::Original ( )
inline

Member Function Documentation

◆ laguer()

template<typename T >
void Laguerre::Original< T >::laguer ( const std::vector< std::complex< T > > & a,
std::complex< T > & x,
int & converged,
int itmax )
inlineprivate

Laguerre's method to find a root of a polynomial.

Parameters
aPolynomial object.
xInitial guess for the root.

◆ operator()()

template<typename T >
void Laguerre::Original< T >::operator() ( std::vector< T > & poly,
std::vector< std::complex< T > > & roots,
std::vector< int > & conv,
int itmax = 80 )
inlineoverridevirtual

Find the roots of a polynomial using Laguerre's method.

Parameters
polyPolynomial object.
rootsVector to store the roots.
convVector to store convergence status of each root.
itmaxMaximum number of iterations.

Implements BaseSolver< T >.

Member Data Documentation

◆ eps

template<typename T >
constexpr T Laguerre::Original< T >::eps = std::numeric_limits<T>::epsilon()
staticconstexprprivate

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