Introduction - If you have any usage issues, please Google them yourself
Use Jacobi and Gauss-Seidel methods to solve a given n×n linear system A
x
⃗
=
b
⃗
with an initial approximation
x
⃗
(0)
.
Note: When checking each a
ii
, first scan downward for the entry with maximum absolute value (a
ii
included). If that entry is non-zero, swap it to the diagonal. Otherwise if that entry is zero, scan upward for the entry with maximum absolute value. If that entry is non-zero, then add that row to the i-th row.