|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.numericalmethod.suanshu.matrix.doubles.matrixtype.sparse.solver.iterative.RelativeTolerance
public class RelativeTolerance
The stopping criteria is that the norm of the residual r relative to
the input base is equal to or smaller than the specified
tolerance, that is,
For example, a||r||2 ------ ≤ tolerance base
Tolerance instance which compares the residual norm
relative to the right-hand side b of a linear system Ax = b
can be created as follows:
Tolerance tolerance = new RelativeTolerance(b.norm());
Or, one which compares the residual norm relative to the initial residual can
be created as follows:
Tolerance tolerance = new RelativeTolerance(b.minus(A.multiply(x0)).norm());
| Field Summary | |
|---|---|
static double |
DEFAULT_TOLERANCE
default tolerance |
| Constructor Summary | |
|---|---|
RelativeTolerance(double base)
Create an instance which uses DEFAULT_TOLERANCE. |
|
RelativeTolerance(double base,
double tolerance)
Create an instance which uses the specified tolerance. |
|
| Method Summary | |
|---|---|
boolean |
updateResidualNorm(double norm)
Check if the updated residual satisfies the tolerance criteria. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final double DEFAULT_TOLERANCE
| Constructor Detail |
|---|
public RelativeTolerance(double base)
DEFAULT_TOLERANCE.
public RelativeTolerance(double base,
double tolerance)
tolerance.
tolerance - the residual norm criteria| Method Detail |
|---|
public boolean updateResidualNorm(double norm)
Tolerance
updateResidualNorm in interface Tolerancenorm - the norm of the updated residual
|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||