![]() ![]() #LnormInf corresponds to the absolute value of the greatest element of the vector. Print ("The solution vector in iteration", iter1, "is:", x) Python library for Gauss-Seidel Iterative Solver Is there a linear algebra library that implements iterative Gauss-Seidel to solve linear systems Or maybe a preconditioned gradient solver EDIT: In the end I used a kind of crude but correct way to solve it. def gauss_seidel(A, b, tolerance, max_iterations, x): ![]() Instead I created my own little function that with the help of a permutation matrix as seen in another answer of mine permutation matrix will produce the solution (x vector) for any square matrix, including those with zeros on the diagonal. To program the Gauss-Seidel method, we can use the following steps: Define the system of linear equations as a matrix equation AX B, where A is the. I know this is old but, I haven't found any pre existing library in python for gauss - seidel. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |