Implemented a stopping criterion.

git-svn-id: file:///home/svnrepos/software/liblbfgs/trunk@21 ecf4c44f-38d1-4fa4-9757-a0b4dd0349fc
This commit is contained in:
naoaki
2008-07-10 13:06:47 +00:00
parent a8edbfe8b9
commit 7eb418b805
2 changed files with 60 additions and 4 deletions

View File

@@ -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