List of magic codes

LU Factorization

LU Factorization is to factorize a square or rectangular matrix A into an upper-triangular matrix U and a lower-triangular L. It can be applied to the Gaussian Elimination. Also, partial pivoting is used to handle general cases and reduce the computational errors.

     PA=LU

Manual of Codes

Conjugate Gradient Method for Solving Linear Systems

Conjugate gradient method can be applied to solve linear systems. It requires the matrix A to be positive definite. CG is an iterative method and only needs the user to provide the matrix-vector operator. In other words, the explicit form of A isn't needed here.

Manual of Codes