Generalized Jacobi and Gauss-Seidel Methods for Solving Linear System of Equations