NULAPACK
NUmerical Linear Algebra PACKage
Loading...
Searching...
No Matches
Functions
python.jacobi Namespace Reference

Functions

 jacobi (a, b, max_iter=1000, tol=1e-8, omega=1.0)
 

Function Documentation

◆ jacobi()

python.jacobi.jacobi (   a,
  b,
  max_iter = 1000,
  tol = 1e-8,
  omega = 1.0 
)
Solve the linear system ax = b using the Jacobi method.

Parameters
----------
a : ndarray
    Coefficient matrix (n x n)
b : ndarray
    Right-hand side vector (n,)
max_iter : int, optional
    Maximum number of iterations
tol : float, optional
    Convergence tolerance
omega : float, optional
    Relaxation factor

Returns
-------
x : ndarray
    Solution vector
status : int
    0 if converged, non-zero otherwise

Definition at line 33 of file jacobi.py.