public class DiagonalPreconditioner extends Object implements Preconditioner
Constructor and Description |
---|
DiagonalPreconditioner(int n)
Constructor for DiagonalPreconditioner
|
Modifier and Type | Method and Description |
---|---|
Vector |
apply(Vector b,
Vector x)
Solves the approximate problem with the given right hand side.
|
void |
setMatrix(Matrix A)
Sets the operator matrix for the preconditioner.
|
Vector |
transApply(Vector b,
Vector x)
Solves the approximate transpose problem with the given right hand side.
|
public DiagonalPreconditioner(int n)
n
- Problem size (number of rows)public Vector apply(Vector b, Vector x)
Preconditioner
apply
in interface Preconditioner
b
- Right hand side of problemx
- Result is stored herepublic Vector transApply(Vector b, Vector x)
Preconditioner
transApply
in interface Preconditioner
b
- Right hand side of problemx
- Result is stored herepublic void setMatrix(Matrix A)
Preconditioner
setMatrix
in interface Preconditioner
A
- Matrix to setup the preconditioner for. Not modifiedCopyright © 2013. All Rights Reserved.