Implemented a stopping criterion.
git-svn-id: file:///home/svnrepos/software/liblbfgs/trunk@21 ecf4c44f-38d1-4fa4-9757-a0b4dd0349fc
This commit is contained in:
		@@ -74,6 +74,8 @@ typedef double lbfgsfloatval_t;
 | 
			
		||||
enum {
 | 
			
		||||
    /** L-BFGS reaches convergence. */
 | 
			
		||||
    LBFGS_SUCCESS = 0,
 | 
			
		||||
    LBFGS_CONVERGENCE = 0,
 | 
			
		||||
    LBFGS_STOP,
 | 
			
		||||
    /** The initial variables already minimize the objective function. */
 | 
			
		||||
    LBFGS_ALREADY_MINIMIZED,
 | 
			
		||||
 | 
			
		||||
@@ -91,6 +93,12 @@ enum {
 | 
			
		||||
    LBFGSERR_INVALID_N_SSE,
 | 
			
		||||
    /** The array x must be aligned to 16 (for SSE). */
 | 
			
		||||
    LBFGSERR_INVALID_X_SSE,
 | 
			
		||||
    /** Invalid parameter lbfgs_parameter_t::epsilon specified. */
 | 
			
		||||
    LBFGSERR_INVALID_EPSILON,
 | 
			
		||||
    /** Invalid parameter lbfgs_parameter_t::past specified. */
 | 
			
		||||
    LBFGSERR_INVALID_TESTPERIOD,
 | 
			
		||||
    /** Invalid parameter lbfgs_parameter_t::delta specified. */
 | 
			
		||||
    LBFGSERR_INVALID_DELTA,
 | 
			
		||||
    /** Invalid parameter lbfgs_parameter_t::linesearch specified. */
 | 
			
		||||
    LBFGSERR_INVALID_LINESEARCH,
 | 
			
		||||
    /** Invalid parameter lbfgs_parameter_t::max_step specified. */
 | 
			
		||||
@@ -172,6 +180,9 @@ typedef struct {
 | 
			
		||||
     */
 | 
			
		||||
    lbfgsfloatval_t epsilon;
 | 
			
		||||
 | 
			
		||||
    int             past;
 | 
			
		||||
    lbfgsfloatval_t delta;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * The maximum number of iterations.
 | 
			
		||||
     *  The lbfgs() function terminates an optimization process with
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user