Skip to main content

thomas_algorithm

Function thomas_algorithm 

Source
pub fn thomas_algorithm(a: &[f64], b: &[f64], c: &[f64], d: &[f64]) -> Vec<f64>
Expand description

Solves the tridiagonal system A x = d using the Thomas algorithm.

a is the sub-diagonal (index 0 unused), b the main diagonal, c the super-diagonal (last entry unused), and d the right-hand side. All slices must have length n.