Function solve_tridiag_sym (o2scl_linalg)

O2scl : Function List

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

*
*     diag[0]  offdiag[0]             0   .....
*  offdiag[0]     diag[1]    offdiag[1]   .....
*           0  offdiag[1]       diag[2]
*           0           0    offdiag[2]   .....
given the N diagonal elements in diag, N-1 diagonal elements in offdiag, and the N elements b from the RHS.

See [EngelnMullges96].

template<class vec_t, class vec2_t, class vec3_t, class vec4_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)

Solve a symmetric tridiagonal linear system.