file
rootfinding.hpp
Classes
- class Options
Typedefs
-
using Vec2 = numeric::
Vector2<double> -
using Mat2 = numeric::
Matrix2<Vec2>
Functions
- auto initial_guess(const std::vector<double>& pa) -> std::vector< Vec2 > -> auto
- auto pbairstow_even(const std::vector<double>& pa, std::vector<Vec2>& vrs, const Options& options) -> std::pair< unsigned int, bool > -> auto
- auto horner(std::vector<double>& pb, std::size_t n, const Vec2& vr) -> Vec2 -> auto
- Horner's rule.
- auto suppress(Vec2& vA, Vec2& vA1, const Vec2& vri, const Vec2& vrj) -> void -> auto
- zero suppression
- auto makeadjoint(const Vec2& vr, Vec2&& vp) -> Mat2 -> auto
- auto delta(const Vec2& vA, const Vec2& vr, Vec2&& vp) -> Vec2 -> auto
- auto horner_eval(std::vector<double> pb, std::size_t n, const double& z) -> double -> auto
Function documentation
auto initial_guess(const std::vector<double>& pa) -> std::vector< Vec2 >
Parameters | |
---|---|
pa | |
Returns | std::vector<Vec2> |
auto pbairstow_even(const std::vector<double>& pa, std::vector<Vec2>& vrs, const Options& options) -> std::pair< unsigned int, bool >
Parameters | |
---|---|
pa | |
vrs | |
options | |
Returns | std::pair<unsigned int, bool> |
auto horner(std::vector<double>& pb, std::size_t n, const Vec2& vr) -> Vec2
Horner's rule.
Parameters | |
---|---|
pb | |
n | |
vr | |
Returns | Vec2 |
Horner's rule is a method for evaluating a polynomial of degree n at a given point x. It involves rewriting the polynomial as a nested multiplication and addition of the form:
P(x) = a_0 + x(a_1 + x(a_2 + ... + x(a_{n-1} + x(a_n))...))
This form allows for efficient evaluation of the polynomial at a given point x using only n multiplications and n additions. Horner's rule is commonly used in numerical methods for polynomial evaluation and interpolation.
auto suppress(Vec2& vA, Vec2& vA1, const Vec2& vri, const Vec2& vrj) -> void
zero suppression
Parameters | |
---|---|
vA in/out | |
vA1 in/out | |
vri in | |
vrj in |
zero suppression is a technique used in the Bairstow method to find the coefficients of the linear remainder of a deflated polynomial without explicitly constructing the deflated polynomial. The goal of zero suppression is to perform the Bairstow process without the need for complex arithmetic within iterations. The technique involves finding the coefficients of the linear remainder of the deflated polynomial using the coefficients of the linear remainder of the original polynomial and the known factor of the original polynomial.
auto makeadjoint(const Vec2& vr, Vec2&& vp) -> Mat2
Parameters | |
---|---|
vr in | |
vp in | |
Returns | Mat2 |
auto horner_eval(std::vector<double> pb, std::size_t n, const double& z) -> double
Parameters | |
---|---|
pb in/out | |
n in | |
z | |
Returns | double |