Class JacobiPreconditioner

  • All Implemented Interfaces:
    Preconditioner

    public class JacobiPreconditioner
    extends Object
    implements Preconditioner
    The Jacobi (or diagonal) preconditioner is one of the simplest forms of preconditioning, such that the preconditioner is the diagonal of the coefficient matrix, i.e., P = diag(A).
    • Constructor Detail

      • JacobiPreconditioner

        public JacobiPreconditioner​(Matrix A)
        Construct a Jacobi preconditioner.
        Parameters:
        A - a coefficient matrix
    • Method Detail

      • solve

        public Vector solve​(Vector x)
        Return P-1x, where P is the diagonal matrix of A. The output vector v has entries:
        vi = xi / Ai,i
        Specified by:
        solve in interface Preconditioner
        Parameters:
        x - a vector
        Returns:
        P-1x