initial_guess

Function initial_guess 

Source
pub fn initial_guess(coeffs: &[f64]) -> Vec<Vector2<f64>>
Expand description

The initial_guess function in Rust calculates the initial guesses for the roots of a polynomial using Bairstow’s method.

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);