21template <
unsigned long N,
unsigned long Base = 2>
constexpr auto make_vdc_table()
22 -> std::array<double, N> {
23 std::array<double, N> table{};
24 lds::VdCorput<Base> gen;
25 for (
unsigned long i = 0; i < N; ++i) {
64 std::array<double, VDC_TABLE_SIZE>
table{};
78constexpr double cos_pi_vdc2(
unsigned long index) {
return COS_PI_VDC2_TABLE[index]; }
83constexpr double circle2_table_x(
unsigned long index) {
return CIRCLE_TABLE_2[index][0]; }
88constexpr double circle2_table_y(
unsigned long index) {
return CIRCLE_TABLE_2[index][1]; }
115 -> std::complex<double> {
116 std::complex<double>
result(0.0, 0.0);
202extern auto aberth(
const std::vector<double>&
coeffs, std::vector<std::complex<double>>&
zs,
220 -> std::vector<std::complex<double>>;
249 -> std::pair<unsigned int, bool>;
282 -> std::vector<std::complex<double>>;
300 -> std::vector<double>;
constexpr std::array< double, VDC_TABLE_SIZE > VDC_TABLE_2
Precomputed table of VdCorput sequence values (base 2)
Definition aberth.hpp:36
auto poly_from_roots(const std::vector< std::complex< double > > &zs) -> std::vector< double >
Reconstruct a monic polynomial from its complex roots.
auto horner_eval_f(const std::vector< double > &coeffs, const double &zval) -> double
Definition aberth.hpp:133
auto horner_eval_c(const std::vector< double > &coeffs, const std::complex< double > &zval) -> std::complex< double >
Definition aberth.hpp:114
constexpr auto make_vdc_table() -> std::array< double, N >
Helper to generate a constexpr table of VdCorput<Base> values.
Definition aberth.hpp:21
constexpr double cos_pi_vdc2(unsigned long index)
Access the precomputed cos(pi * vdc2_table[i]) value.
Definition aberth.hpp:78
constexpr double circle2_table_x(unsigned long index)
Access the precomputed Circle base-2 table x-coordinate.
Definition aberth.hpp:83
auto poly_from_autocorr_roots(const std::vector< std::complex< double > > &zs) -> std::vector< double >
Reconstruct a monic polynomial from its autocorrelation roots.
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)
auto aberth_autocorr(const std::vector< double > &coeffs, std::vector< std::complex< double > > &zs, const ginger::Options &options) -> std::pair< unsigned int, bool >
Single-threading Aberth-Ehrlich method (specifically for auto-correlation functions)
auto initial_aberth(const std::vector< double > &coeffs) -> std::vector< std::complex< double > >
Initial guess for the Aberth-Ehrlich method.
constexpr const auto VDC_TABLE_SIZE
Size of the precomputed VdCorput base-2 table.
Definition aberth.hpp:32
auto make_cos_pi_vdc2_table() noexcept -> std::array< double, VDC_TABLE_SIZE >
Helper to generate the precomputed cos(pi * vdc2_table[i]) table.
Definition aberth.hpp:63
double vdc2_table(unsigned long index)
Access the precomputed VdCorput base-2 table.
Definition aberth.hpp:41
auto make_circle_table() noexcept -> std::array< std::array< double, 2 >, VDC_TABLE_SIZE >
Helper to generate the precomputed Circle base-2 table.
Definition aberth.hpp:47
auto aberth(const std::vector< double > &coeffs, std::vector< std::complex< double > > &zs, const ginger::Options &options) -> std::pair< unsigned int, bool >
Single-threading Aberth-Ehrlich method.
auto leja_order(const std::vector< std::complex< double > > &points) -> std::vector< std::complex< double > >
Leja ordering of complex points.
constexpr double circle2_table_y(unsigned long index)
Access the precomputed Circle base-2 table y-coordinate.
Definition aberth.hpp:88
Options for convergence-based algorithms.
Definition aberth.hpp:13