Function thomas_solve_inplace

Source
pub fn thomas_solve_inplace(
    lower: &[f64],
    diag: &[f64],
    upper: &[f64],
    rhs: &mut [f64],
    work: &mut [f64],
)
Expand description

Solve a tridiagonal system Ax = d using the Thomas algorithm.

A is given by (lower, diag, upper) vectors. Modifies rhs in place to contain the solution. Uses pre-allocated work buffer for the forward sweep (must be same length as diag).