189 const auto r =
vr.
x();
190 const auto q =
vr.y();
191 const auto p =
vp.x();
192 const auto s =
vp.y();
195 const auto det =
s * (
p *
r +
s) -
p *
p *
q;
198 const auto mx =
s *
vA.x() -
p *
vA.y();
199 const auto my = -
p *
q *
vA.x() + (
p *
r +
s) *
vA.y();
220 return mp.mdot(
vA) /
mp.det();
constexpr auto make_vdc_table() -> std::array< double, N >
Helper to generate a constexpr table of VdCorput<Base> values.
Definition aberth.hpp:21
Matrix2.
Definition matrix2.hpp:28
constexpr auto x() const -> const T1 &
Get the first column vector.
Definition matrix2.hpp:47
Vector2.
Definition vector2.hpp:19
constexpr auto y() const noexcept -> const T2 &
Definition vector2.hpp:81
constexpr auto x() const noexcept -> const T1 &
Definition vector2.hpp:74
2x2 matrix template for polynomial root-finding
Options for convergence-based algorithms.
Definition aberth.hpp:13
auto initial_guess(std::vector< double > coeffs) -> std::vector< Vec2 >
Initial guess for the parallel Bairstow method.
auto suppress(Vec2 &vA, Vec2 &vA1, const Vec2 &vri, const Vec2 &vrj) -> void
Zero suppression step in Bairstow's method (matrix variant)
auto suppress_old(Vec2 &vA, Vec2 &vA1, const Vec2 &vri, const Vec2 &vrj) -> void
Zero suppression step in Bairstow's method (scalar arithmetic)
auto pbairstow_even_st(const std::vector< double > &coeffs, std::vector< Vec2 > &vrs, const ginger::Options &options) -> std::pair< unsigned int, bool >
Single-threading Bairstow's method (even degree only)
auto horner_eval(std::vector< double > coeffs1, std::size_t degree, const double &z) -> double
Definition rootfinding.hpp:241
auto makeadjoint(const Vec2 &vr, const Vec2 &vp) -> Mat2
Create adjoint matrix from two vectors.
Definition rootfinding.hpp:168
auto delta_scalar(const Vec2 &vA, const Vec2 &vr, const Vec2 &vp) -> Vec2
Calculate Newton correction delta (scalar arithmetic, no Matrix2 temporaries)
Definition rootfinding.hpp:188
auto poly_from_quadratic_factors(const std::vector< Vec2 > &vrs) -> std::vector< double >
Reconstruct a monic polynomial from its quadratic factors.
auto suppress2(Vec2 &vA, Vec2 &vA1, const Vec2 &vri, const Vec2 &vrj) -> void
Zero suppression step in Bairstow's method (variant 2)
auto horner(std::vector< double > &coeffs1, std::size_t degree, const Vec2 &vr) -> Vec2
Horner's rule.
auto pbairstow_even(const std::vector< double > &coeffs, std::vector< Vec2 > &vrs, const ginger::Options &options) -> std::pair< unsigned int, bool >
Definition rootfinding.hpp:78
ginger::Vector2< double > Vec2
Definition rootfinding.hpp:14
auto delta(const Vec2 &vA, const Vec2 &vr, const Vec2 &vp) -> Vec2
Calculate Newton correction delta (matrix-based)
Definition rootfinding.hpp:218