|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.math3.linear.RealLinearOperator
org.apache.commons.math3.linear.JacobiPreconditioner
public class JacobiPreconditioner
This class implements the standard Jacobi (diagonal) preconditioner. For a
matrix Aij, this preconditioner is
M = diag(A11, A22, …).
create(RealLinearOperator)
returns the inverse of this
preconditioner,
M-1 = diag(1 / A11, 1 / A22, …)
Field Summary | |
---|---|
private ArrayRealVector |
diag
The diagonal coefficients of the preconditioner. |
Constructor Summary | |
---|---|
JacobiPreconditioner(double[] diag,
boolean deep)
Creates a new instance of this class. |
Method Summary | |
---|---|
static JacobiPreconditioner |
create(RealLinearOperator a)
Creates a new instance of this class. |
int |
getColumnDimension()
Returns the dimension of the domain of this operator. |
int |
getRowDimension()
Returns the dimension of the codomain of this operator. |
RealVector |
operate(RealVector x)
Returns the result of multiplying this by the vector x . |
Methods inherited from class org.apache.commons.math3.linear.RealLinearOperator |
---|
isTransposable, operateTranspose |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final ArrayRealVector diag
Constructor Detail |
---|
public JacobiPreconditioner(double[] diag, boolean deep)
diag
- the diagonal coefficients of the linear operator to be
preconditioneddeep
- true
if a deep copy of the above array should be
performedMethod Detail |
---|
public static JacobiPreconditioner create(RealLinearOperator a) throws NonSquareOperatorException
a
does not
extend AbstractRealMatrix
, then the coefficients of the
underlying matrix are not accessible, coefficient extraction is made by
matrix-vector products with the basis vectors (and might therefore take
some time). With matrices, direct entry access is carried out.
a
- the linear operator for which the preconditioner should be built
NonSquareOperatorException
- if a
is not squarepublic int getColumnDimension()
getColumnDimension
in class RealLinearOperator
public int getRowDimension()
getRowDimension
in class RealLinearOperator
public RealVector operate(RealVector x)
this
by the vector x
.
operate
in class RealLinearOperator
x
- the vector to operate on
this
instance with x
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |