Function solve_tridiag_sym (o2scl_linalg)¶
-
template<class vec_t, class vec2_t, class vec3_t, class vec4_t, class mem_t, class mem_vec_t, class fp_t>
void o2scl_linalg::solve_tridiag_sym(const vec_t &diag, const vec2_t &offdiag, const vec3_t &b, vec4_t &x, size_t N, mem_t &m)¶ Solve a symmetric tridiagonal linear system with user-specified memory.
This function solves the system \( A x = b \) where \( A \) is a matrix of the form
given the* * diag[0] offdiag[0] 0 ..... * offdiag[0] diag[1] offdiag[1] ..... * 0 offdiag[1] diag[2] * 0 0 offdiag[2] .....
N
diagonal elements indiag
,N-1
diagonal elements inoffdiag
, and theN
elementsb
from the RHS.See [EngelnMullges96].