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)
Preconditionerapply in interface Preconditionerb - Right hand side of problemx - Result is stored herepublic Vector transApply(Vector b, Vector x)
PreconditionertransApply in interface Preconditionerb - Right hand side of problemx - Result is stored herepublic void setMatrix(Matrix A)
PreconditionersetMatrix in interface PreconditionerA - Matrix to setup the preconditioner for. Not modifiedCopyright © 2015. All Rights Reserved.