pub fn delta(
v_big_a: &Vector2<f64>,
vr: &Vector2<f64>,
vp: &Vector2<f64>,
) -> Vector2<f64>Expand description
The delta function calculates the adjustment vector for Bairstow’s method.
Solves the 2x2 linear system for the optimal adjustment to current quadratic factor estimates $$ (r, q) $$:
$$ \begin{bmatrix} r p + s & p \ q p & s \end{bmatrix} \begin{bmatrix} \Delta r \ \Delta q \end{bmatrix} = \begin{bmatrix} A \ B \end{bmatrix} $$
where $$ (p, s) = (r_i - r_j,; q_i - q_j) $$ is the difference between two factor estimates, and $$ (A, B) $$ is the remainder from polynomial division.
Arguments:
vA: A vector representing the coefficients of a polynomial equation.vr: The parametervrrepresents the vector[-2.0, 0.0].vp: The parametervprepresents the vector vr - vrj
§Examples:
use ginger::rootfinding::delta;
use ginger::vector2::Vector2;
let mut vA1 = Vector2::new(1.0, 2.0);
let vri = Vector2::new(-2.0, 0.0);
let vrj = Vector2::new(4.0, 5.0);
let vd = delta(&vA1, &vri, &vrj);
assert_eq!(vd, Vector2::new(0.2, 0.4));