aberth.hpp file
Functions
- auto vdc2_table(unsigned long index) -> double
- auto cos_pi_vdc2(unsigned long index) -> double
- auto circle2_table_x(unsigned long index) -> double
- auto circle2_table_y(unsigned long index) -> double
- auto initial_aberth(const std::vector<double>& coeffs) -> std::vector< std::complex< double > > -> auto
- Initial guess for the Aberth-Ehrlich method.
- auto aberth(const std::vector<double>& coeffs, std::vector<std::complex<double>>& zs, const Options& options) -> std::pair< unsigned int, bool > -> auto
- Single-threading Aberth-Ehrlich method.
- auto aberth_mt(const std::vector<double>& coeffs, std::vector<std::complex<double>>& zs, const Options& options) -> std::pair< unsigned int, bool > -> auto
- Multi-threading Aberth-Ehrlich method.
- auto initial_aberth_autocorr(const std::vector<double>& coeffs) -> std::vector< std::complex< double > > -> auto
- Initial guess for the Aberth-Ehrlich method (specifically for auto-correlation functions)
- auto aberth_autocorr(const std::vector<double>& coeffs, std::vector<std::complex<double>>& zs, const Options& options) -> std::pair< unsigned int, bool > -> auto
- Single-threading Aberth-Ehrlich method (specifically for auto-correlation functions)
- auto aberth_autocorr_mt(const std::vector<double>& coeffs, std::vector<std::complex<double>>& zs, const Options& options) -> std::pair< unsigned int, bool > -> auto
- Multi-threading Aberth-Ehrlich method (specifically for auto-correlation functions)
- auto poly_from_roots(const std::vector<std::complex<double>>& zs) -> std::vector< double > -> auto
- auto leja_order(const std::vector<std::complex<double>>& points) -> std::vector< std::complex< double > > -> auto
- Leja ordering of complex points.
- auto poly_from_autocorr_roots(const std::vector<std::complex<double>>& zs) -> std::vector< double > -> auto
- Reconstruct a monic polynomial from its autocorrelation roots.
Function documentation
auto initial_aberth(const std::vector<double>& coeffs) -> std::vector< std::complex< double > >
Initial guess for the Aberth-Ehrlich method.
| Parameters | |
|---|---|
| coeffs in | The coeffs parameter is a vector of doubles that represents the coefficients of a polynomial. |
| Returns | The function initial_aberth returns a vector of Complex numbers. |
The initial_aberth function calculates the initial values for the Aberth-Ehrlich method for finding the roots of a polynomial.
auto aberth(const std::vector<double>& coeffs, std::vector<std::complex<double>>& zs, const Options& options) -> std::pair< unsigned int, bool >
Single-threading Aberth-Ehrlich method.
| Parameters | |
|---|---|
| coeffs in | The coeffs parameter is a vector representing the coefficients of a polynomial. Each element of the vector corresponds to a term in the polynomial, starting from the highest degree term and ending with the constant term. For example, if the polynomial is 3x^2 + 2x + @param[in] zszsis a vector of complex numbers representing the initial guesses for the roots of the polynomial. The function will update these values iteratively to converge to the actual roots. @param[in] options Theoptionsparameter is an object of typeOptionsthat contains the maximum number of iterations (max_iters) and the tolerance (tolerance`). These options control the convergence criteria for the Aberth-Ehrlich method. |
| zs | |
| options | |
| Returns | The aberth function returns a std::pair<unsigned int, bool>. The first element of the pair represents the number of iterations performed, and the second element represents whether the method converged to a solution within the specified tolerance. |
The aberth function is a multi-threaded implementation of the Aberth-Ehrlich method for finding the roots of a polynomial.
Aberth's method is a method for finding the roots of a polynomial that is robust but requires complex arithmetic even if the polynomial is real. This is because it starts with complex initial approximations.
auto aberth_mt(const std::vector<double>& coeffs, std::vector<std::complex<double>>& zs, const Options& options) -> std::pair< unsigned int, bool >
Multi-threading Aberth-Ehrlich method.
| Parameters | |
|---|---|
| coeffs in | The coeffs parameter is a vector representing the coefficients of a polynomial. Each element of the vector corresponds to a term in the polynomial, starting from the highest degree term and ending with the constant term. For example, if the polynomial is 3x^2 + 2x + @param[in] zszsis a vector of complex numbers representing the initial guesses for the roots of the polynomial. The function will update these values iteratively to converge to the actual roots. @param[in] options Theoptionsparameter is an object of typeOptionsthat contains the maximum number of iterations (max_iters) and the tolerance (tolerance`). These options control the convergence criteria for the Aberth-Ehrlich method. |
| zs | |
| options | |
| Returns | The aberth function returns a std::pair<unsigned int, bool>. The first element of the pair represents the number of iterations performed, and the second element represents whether the method converged to a solution within the specified tolerance. |
The aberth function is a multi-threaded implementation of the Aberth-Ehrlich method for finding the roots of a polynomial.
Aberth's method is a method for finding the roots of a polynomial that is robust but requires complex arithmetic even if the polynomial is real. This is because it starts with complex initial approximations.
auto initial_aberth_autocorr(const std::vector<double>& coeffs) -> std::vector< std::complex< double > >
Initial guess for the Aberth-Ehrlich method (specifically for auto-correlation functions)
| Parameters | |
|---|---|
| coeffs in | The coeffs parameter is a vector of doubles that represents the coefficients of a polynomial. |
| Returns | The function initial_aberth returns a vector of Complex numbers. |
The initial_aberth function calculates the initial values for the Aberth-Ehrlich method for finding the roots of a polynomial.
auto aberth_autocorr(const std::vector<double>& coeffs, std::vector<std::complex<double>>& zs, const Options& options) -> std::pair< unsigned int, bool >
Single-threading Aberth-Ehrlich method (specifically for auto-correlation functions)
| Parameters | |
|---|---|
| coeffs in | The coeffs parameter is a vector representing the coefficients of a polynomial. Each element of the vector corresponds to a term in the polynomial, starting from the highest degree term and ending with the constant term. For example, if the polynomial is 3x^2 + 2x + @param[in] zszsis a vector of complex numbers representing the initial guesses for the roots of the polynomial. The function will update these values iteratively to converge to the actual roots. @param[in] options Theoptionsparameter is an object of typeOptionsthat contains the maximum number of iterations (max_iters) and the tolerance (tolerance`). These options control the convergence criteria for the Aberth-Ehrlich method. |
| zs | |
| options | |
| Returns | The aberth function returns a std::pair<unsigned int, bool>. The first element of the pair represents the number of iterations performed, and the second element represents whether the method converged to a solution within the specified tolerance. |
The aberth function is a multi-threaded implementation of the Aberth-Ehrlich method for finding the roots of a polynomial.
Aberth's method is a method for finding the roots of a polynomial that is robust but requires complex arithmetic even if the polynomial is real. This is because it starts with complex initial approximations.
auto aberth_autocorr_mt(const std::vector<double>& coeffs, std::vector<std::complex<double>>& zs, const Options& options) -> std::pair< unsigned int, bool >
Multi-threading Aberth-Ehrlich method (specifically for auto-correlation functions)
| Parameters | |
|---|---|
| coeffs in | The coeffs parameter is a vector representing the coefficients of a polynomial. Each element of the vector corresponds to a term in the polynomial, starting from the highest degree term and ending with the constant term. For example, if the polynomial is 3x^2 + 2x + @param[in] zszsis a vector of complex numbers representing the initial guesses for the roots of the polynomial. The function will update these values iteratively to converge to the actual roots. @param[in] options Theoptionsparameter is an object of typeOptionsthat contains the maximum number of iterations (max_iters) and the tolerance (tolerance`). These options control the convergence criteria for the Aberth-Ehrlich method. |
| zs | |
| options | |
| Returns | The aberth function returns a std::pair<unsigned int, bool>. The first element of the pair represents the number of iterations performed, and the second element represents whether the method converged to a solution within the specified tolerance. |
The aberth function is a multi-threaded implementation of the Aberth-Ehrlich method for finding the roots of a polynomial.
Aberth's method is a method for finding the roots of a polynomial that is robust but requires complex arithmetic even if the polynomial is real. This is because it starts with complex initial approximations.
auto leja_order(const std::vector<std::complex<double>>& points) -> std::vector< std::complex< double > >
Leja ordering of complex points.
| Parameters | |
|---|---|
| points in | Input vector of complex numbers |
| Returns | std::vector<std::complex<double>> Reordered points in Leja sequence |
Reorders complex points using the greedy Leja algorithm: starts with the smallest-magnitude point, then iteratively selects the remaining point that maximizes the minimum Euclidean distance to all already-selected points. This ordering reduces numerical error when reconstructing polynomials from roots.
auto poly_from_autocorr_roots(const std::vector<std::complex<double>>& zs) -> std::vector< double >
Reconstruct a monic polynomial from its autocorrelation roots.
| Parameters | |
|---|---|
| zs in | Roots found by aberth_autocorr or aberth_autocorr_mt |
| Returns | std::vector<double> Monic polynomial coefficients (highest degree first) |
Auto-correlation (palindromic) polynomials have roots in reciprocal pairs. The aberth_autocorr functions find the degree/2 "independent" roots. This function adds the reciprocal of each root (1/z) to get the full set of degree roots, then reconstructs with Leja ordering.