|
Laguerre polynomials
|
#include <Laguerre18m.h>
Public Member Functions | |
| ModifiedLaguerre18 () | |
| void | operator() (std::vector< T > &poly, std::vector< std::complex< T > > &roots, std::vector< int > &conv, int itmax) override |
| Find the roots of a polynomial using Laguerre's method. | |
Private Member Functions | |
| T | cross (std::vector< int > &h, std::vector< T > &a, int c, int i) |
| Calculate the determinant between two points. | |
| void | conv_hull (int n, std::vector< T > &a, std::vector< int > &h, int &c) |
| Calculate the convex hull of a set of points. Dont forget to calculate Andrews alghoritm to vector a! | |
| void | estimates (vector< T > &alpha, int deg, std::vector< std::complex< T > > &roots, std::vector< int > &conv, int &nz) |
| Estimate roots of a polynomial. | |
| void | rcheck_lag (std::vector< T > &p, vector< T > &alpha, int deg, complex< T > &b, complex< T > &c, complex< T > z, T r, int &conv, T &berr, T &cond) |
| Perform Laguerre correction, compute backward error, and condition. | |
| void | check_lag (std::vector< T > &p, std::vector< T > &alpha, int deg, std::complex< T > &b, std::complex< T > &c, std::complex< T > z, T r, int &conv, T &berr, T &cond) |
| Perform Laguerre correction, compute backward error, and condition. | |
| void | modify_lag (int deg, std::complex< T > &b, std::complex< T > &c, std::complex< T > z, int j, std::vector< std::complex< T > > &roots) |
| Modify Laguerre correction based on Aberth's method. | |
Static Private Attributes | |
| static constexpr T | eps = std::numeric_limits<T>::epsilon() |
| static constexpr T | big = std::numeric_limits<T>::max() |
| static constexpr T | small = std::numeric_limits<T>::min() |
| static constexpr T | PI = std::numbers::pi_v<T> |
| static constexpr T | pi2 = PI*static_cast<T>(2) |
|
inline |
|
inlineprivate |
Perform Laguerre correction, compute backward error, and condition.
| p | Vector of polynomial coefficients. |
| alpha | Vector of coefficients. |
| deg | Degree of the polynomial. |
| b | Output complex number representing root. |
| c | Output complex number representing correction. |
| z | Complex number used for correction. |
| r | Value used for correction. |
| conv | Output value indicating convergence status. |
| berr | Output backward error. |
| cond | Output condition number. |
|
inlineprivate |
Calculate the convex hull of a set of points. Dont forget to calculate Andrews alghoritm to vector a!
| n | Number of points. |
| a | Vector of templated type T representing points coordinates. |
| h | Vector to store the convex hull. |
| c | Number of points in the convex hull. |
|
inlineprivate |
Calculate the determinant between two points.
| h | Vector of integers representing points. |
| a | Vector of Ts representing points' coordinates. |
| c | Index for the current point. |
| i | Index for the next point. |
|
inlineprivate |
Estimate roots of a polynomial.
| alpha | Polynomial object. |
| deg | Degree of the polynomial. |
| roots | Vector to store the estimated roots. |
| conv | Vector to store convergence status of each root. |
| nz | Number of zeros. |
|
inlineprivate |
Modify Laguerre correction based on Aberth's method.
| deg | Degree of the polynomial. |
| b | Complex number representing root. |
| c | Complex number representing correction. |
| z | Complex number used for correction. |
| j | Index of the root to modify. |
| roots | Vector of estimated roots. |
|
inlineoverridevirtual |
Find the roots of a polynomial using Laguerre's method.
| poly | Polynomial object. |
| roots | Vector to store the roots. |
| conv | Vector to store convergence status of each root. |
| itmax | Maximum number of iterations. |
Implements BaseSolver< T >.
|
inlineprivate |
Perform Laguerre correction, compute backward error, and condition.
| p | Polynomial object. |
| alpha | Vector of coefficients. |
| b | Output complex number representing root. |
| c | Output complex number representing correction. |
| z | Complex number used for correction. |
| r | Value used for correction. |
| conv | Output value indicating convergence status. |
| berr | Output backward error. |
| cond | Output condition number. |
|
staticconstexprprivate |
|
staticconstexprprivate |
|
staticconstexprprivate |
|
staticconstexprprivate |
|
staticconstexprprivate |