SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.matrix.doubles.matrixtype.sparse.solver.iterative.preconditioner
Class JacobiPreconditioner

java.lang.Object
  extended by com.numericalmethod.suanshu.matrix.doubles.matrixtype.sparse.solver.iterative.preconditioner.JacobiPreconditioner
All Implemented Interfaces:
Preconditioner

public class JacobiPreconditioner
extends java.lang.Object
implements Preconditioner

The Jacobi (or diagonal) preconditioner is one of the simplest forms of preconditioning, in which the preconditioner is chosen to be the diagonal of the matrix P = diag(A).


Constructor Summary
JacobiPreconditioner(Matrix A)
           
 
Method Summary
 Vector solve(Vector x)
          Return P-1x, where P is the diagonal matrix with the same diagonal as A.
 Vector transposeSolve(Vector x)
          P-t = P-1 for this preconditioner.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JacobiPreconditioner

public JacobiPreconditioner(Matrix A)
Method Detail

solve

public Vector solve(Vector x)
Return P-1x, where P is the diagonal matrix with the same diagonal as A. Therefore, the output vector v has entries:
vi = xi / Ai

Specified by:
solve in interface Preconditioner
Parameters:
x - the input Vector
Returns:
P-1x

transposeSolve

public Vector transposeSolve(Vector x)
P-t = P-1 for this preconditioner.

Specified by:
transposeSolve in interface Preconditioner
Parameters:
x -
Returns:
solve(x)

SuanShu, a Java numerical and statistical library

Copyright © 2011 Numerical Method Inc. Ltd. All Rights Reserved.