class SimpleUnivariateValueChecker extends AbstractConvergenceChecker<UnivariatePointValuePair> {

    @Override
    public boolean converged(final int iteration,
                             final UnivariatePointValuePair previous,
                             final UnivariatePointValuePair current) {
        if (maxIterationCount != ITERATION_CHECK_DISABLED && iteration >= maxIterationCount) {
            return true;
        }

        final double p = previous.getValue();
        final double c = current.getValue();
        final double difference = FastMath.abs(p - c);
        final double size = FastMath.max(FastMath.abs(p), FastMath.abs(c));
        return difference <= size * getRelativeThreshold() ||
            difference <= getAbsoluteThreshold();
    }

    public  SimpleUnivariateValueChecker(final double relativeThreshold,
                                        final double absoluteThreshold);
    public  SimpleUnivariateValueChecker(final double relativeThreshold,
                                        final double absoluteThreshold,
                                        final int maxIter);

}