Class AbsoluteTolerance

  • All Implemented Interfaces:
    Tolerance

    public class AbsoluteTolerance
    extends 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 Detail

      • DEFAULT_TOLERANCE

        public static final double DEFAULT_TOLERANCE
        default tolerance
        See Also:
        Constant Field Values
    • Constructor Detail

      • AbsoluteTolerance

        public AbsoluteTolerance()
        Construct an instance with DEFAULT_TOLERANCE.
      • AbsoluteTolerance

        public AbsoluteTolerance​(double tolerance)
        Construct an instance with specified tolerance.
        Parameters:
        tolerance - the residual norm criteria
    • Method Detail

      • isResidualSmall

        public boolean isResidualSmall​(double norm)
        Description copied from interface: Tolerance
        Checks if the updated residual satisfies the tolerance criteria.
        Specified by:
        isResidualSmall in interface Tolerance
        Parameters:
        norm - the norm of the updated residual
        Returns:
        true if the residual norm is small enough