protected boolean considerCandidate(double fx_candidate, double fx_prev,
											double predictedReduction, double stepLength ) {

		// compute model prediction accuracy
		double actualReduction = fx_prev-fx_candidate;

		if( actualReduction == 0 || predictedReduction == 0 ) {
			if( verbose != null )
				verbose.println(totalFullSteps+" reduction of zero");
			return true;
		}

		double ratio = actualReduction/predictedReduction;

		if( fx_candidate > fx_prev || ratio < 0.25 ) {
			// if the improvement is too small (or not an improvement) reduce the region size
			regionRadius = 0.5*regionRadius;
		} else {
			if( ratio > 0.75 ) {
				regionRadius = min(max(3*stepLength,regionRadius),config.regionMaximum);
			}
		}

		// The new state has been accepted. See if it has converged and change the candidate state to the actual state
		if( fx_candidate < fx_prev && ratio > 0 ) {
			boolean converged = checkConvergenceFTest(fx_candidate,fx_prev);
			if( verbose != null ) {
				verbose.printf("%-4d  %9.3E  %10.3E  %9.3E  %9.3E  %9.3E  %6.2f   %6.2E\n",
						totalSelectSteps, fx_candidate, fx_candidate-fx_prev,stepLength,ftest_val,gtest_val, ratio, regionRadius);
				if( converged ) {
					System.out.println("Converged f-test");
				}
			}

			return acceptNewState(converged,fx_candidate);
		} else {
			mode = Mode.DETERMINE_STEP;
			return false;
		}
	}
protected boolean considerCandidate ( double fx_candidate , double fx_prev , double predictedReduction , double stepLength ) { double actualReduction = fx_prev - fx_candidate ; if ( actualReduction == 0 || predictedReduction == 0 ) { if ( verbose != null ) verbose . println ( totalFullSteps + " reduction of zero" ) ; return true ; } double ratio = actualReduction / predictedReduction ; if ( fx_candidate > fx_prev || ratio < 0.25 ) { regionRadius = 0.5 * regionRadius ; } else { if ( ratio > 0.75 ) { regionRadius = min ( max ( 3 * stepLength , regionRadius ) , config . regionMaximum ) ; } } if ( fx_candidate < fx_prev && ratio > 0 ) { boolean converged = checkConvergenceFTest ( fx_candidate , fx_prev ) ; if ( verbose != null ) { verbose . printf ( "%-4d  %9.3E  %10.3E  %9.3E  %9.3E  %9.3E  %6.2f   %6.2E\n" , totalSelectSteps , fx_candidate , fx_candidate - fx_prev , stepLength , ftest_val , gtest_val , ratio , regionRadius ) ; if ( converged ) { System . out . println ( "Converged f-test" ) ; } } return acceptNewState ( converged , fx_candidate ) ; } else { mode = Mode . DETERMINE_STEP ; return false ; } }
Consider updating the system with the change in state p. The update will never
be accepted if the cost function increases.

@param fx_candidate Actual score at the candidate 'x'
@param fx_prev  Score at the current 'x'
@param predictedReduction Reduction in score predicted by quadratic model
@param stepLength The length of the step, i.e. |p|
@return true if it should update the state or false if it should try agian