gauss_seidel#

pybrops.model.gmod.rrBLUPModel0.gauss_seidel(A, b, atol=1e-08, maxiter=1000)[source]#

Solve the equation Ax = b using the Gauss-Seidel method.

Parameters:
  • A (numpy.ndarray) – A diagonal dominant or symmetric positive definite matrix of shape (nmkr,nmkr).

  • b (numpy.ndarray) – A vector of shape (nmkr,).

  • atol (Real) – Absolute tolerance. Iterate until the sum of absolute differences between successive iterations is less than this value or maxiter is reached. Must be non-negative.

  • maxiter (Integral) – Maximum number of iterations.

Returns:

x – Solution to the system of equations.

Return type:

numpy.ndarray