pub fn initial_guess(coeffs: &[f64]) -> Vec<Vector2<f64>>Expand description
The initial_guess function generates initial quadratic factor estimates for Bairstow’s method.
Estimates are placed around a circle centered at $$ c $$ with radius $$ R $$:
$$ c = -\frac{a_1}{n a_0}, \qquad R = \sqrt[n]{|P(c)|} $$
where the angular positions come from a van der Corput low-discrepancy sequence.
Arguments:
coeffs: A vector of coefficients representing a polynomial.
Returns:
The function initial_guess returns a vector of Vector2 structs, which represent the initial
guesses for the roots of a polynomial equation.
§Examples:
use ginger::rootfinding::initial_guess;
use ginger::vector2::Vector2;
let coeffs = vec![10.0, 34.0, 75.0, 94.0, 150.0, 94.0, 75.0, 34.0, 10.0];
let vr0s = initial_guess(&coeffs);