SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.matrix.doubles.matrixtype.sparse.solver.iterative
Class AbsoluteTolerance

java.lang.Object
  extended by com.numericalmethod.suanshu.matrix.doubles.matrixtype.sparse.solver.iterative.AbsoluteTolerance
All Implemented Interfaces:
Tolerance

public class AbsoluteTolerance
extends java.lang.Object
implements Tolerance

The stopping criteria is that the norm of the residual r is equal to or smaller than the specified tolerance, that is,

||r||2 ≤ tolerance


Field Summary
static double DEFAULT_TOLERANCE
          default tolerance
 
Constructor Summary
AbsoluteTolerance()
          Create an instance which uses DEFAULT_TOLERANCE.
AbsoluteTolerance(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

DEFAULT_TOLERANCE

public static final double DEFAULT_TOLERANCE
default tolerance

See Also:
Constant Field Values
Constructor Detail

AbsoluteTolerance

public AbsoluteTolerance()
Create an instance which uses DEFAULT_TOLERANCE.


AbsoluteTolerance

public AbsoluteTolerance(double tolerance)
Create an instance which uses the specified tolerance.

Parameters:
tolerance - the residual norm criteria
Method Detail

updateResidualNorm

public boolean updateResidualNorm(double norm)
Description copied from interface: Tolerance
Check if the updated residual satisfies the tolerance criteria.

Specified by:
updateResidualNorm in interface Tolerance
Parameters:
norm - the norm of the updated residual
Returns:
true if the residual norm is small enough

SuanShu, a Java numerical and statistical library

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