=================================== Solving Systems of Linear Equations [TOC] =================================== In this example we solve a system of linear equations $Ax = b$ were the coefficient matrix is *symmetric positiv definite and banded*. We first compute the Cholesky factorization $S = L L^T$ with __lapack::pbtrf__ which is the FLENS port of LAPACK's __dpbtrf__. We then solve $Lu=b$ and then $L^T x = u$ using __lapack::pbtrs__ which is the port of __dpbtrs__. Note that we might rename __lapack::pbtrf__ to `lapack::potrf` and __lapack::pbtrs__ to `lapack::potrs`. :links: __lapack::pbtrf__ -> file:flens/lapack/pb/pbtrf.h __lapack::pbtrs__ -> file:flens/lapack/pb/pbtrs.h __dpbtrf__ -> file:cxxlapack/netlib/lapack/dpbtrf.f __dpbtrs__ -> file:cxxlapack/netlib/lapack/dpbtrs.f Example Code ============ :import: flens/examples/lapack-pbtrs.cc [stripped, downloadable] Comments on Example Code ======================== :import: flens/examples/lapack-pbtrs.cc [brief] Compile ======= Note that we need to link against an external LAPACK implementation: *--[SHELL]----------------------------------------------------------------* | | | cd flens/examples | | g++ -std=c++11 -Wall -I../.. -DUSE_CXXLAPACK -framework vecLib +++| | -o lapack-pbtrs lapack-pbtrs.cc | | | *-------------------------------------------------------------------------* Run === *--[SHELL]----------------------------------------------------------------* | | | cd flens/examples | | ./lapack-pbtrs | | | *-------------------------------------------------------------------------*