Class JacobiPreconditioner

java.lang.Object
org.ojalgo.matrix.task.iterative.JacobiPreconditioner
All Implemented Interfaces:
Preconditioner

public final class JacobiPreconditioner extends Object implements Preconditioner
Simple diagonal (Jacobi) preconditioner: M = diag(A), apply M^{-1} x = x ./ diag(A).

Compatibility

  • Well-suited as a lightweight, symmetry-preserving choice for methods that benefit from SPD preconditioning when A has positive diagonal entries.
  • Usable as a right-preconditioner in methods for general nonsymmetric systems where a transpose action equals the forward action.
  • Ignored by stationary fixed-point methods that do not use preconditioners.
  • Field Details

    • myInvDiag

      private transient R064Store myInvDiag
  • Constructor Details

    • JacobiPreconditioner

      public JacobiPreconditioner()
  • Method Details

    • apply

      public void apply(Access1D<Double> src, PhysicalStore<Double> dst)
      Description copied from interface: Preconditioner
      Apply M^{-1} to a vector. src and dst may alias.
      Specified by:
      apply in interface Preconditioner
    • prepare

      public void prepare(List<Equation> equations, int dimension)
      Description copied from interface: Preconditioner
      Prepare internal structures for a specific system. Implementations may analyse sparsity or extract diagonals/factors here.
      Specified by:
      prepare in interface Preconditioner
      Parameters:
      equations - The active set of rows constituting the system body.
      dimension - The vector dimension (number of variables / size of solution vector).