Use LBFGS_LINESEARCH_BACKTRACKING_STRONG instead of LBFGS_LINESEARCH_BACKTRACKING.

git-svn-id: file:///home/svnrepos/software/liblbfgs/trunk@45 ecf4c44f-38d1-4fa4-9757-a0b4dd0349fc
This commit is contained in:
naoaki
2009-02-16 13:37:48 +00:00
parent 1cae453cca
commit 1b33e075df
3 changed files with 8 additions and 10 deletions

View File

@@ -362,9 +362,7 @@ int lbfgs(
linesearch = line_search_morethuente;
break;
case LBFGS_LINESEARCH_BACKTRACKING:
linesearch = line_search_backtracking;
break;
case LBFGS_LINESEARCH_BACKTRACKING_LOOSE:
case LBFGS_LINESEARCH_BACKTRACKING_STRONG:
linesearch = line_search_backtracking;
break;
default:
@@ -756,7 +754,7 @@ static int line_search_backtracking(
if (*f <= finit + *stp * dgtest) {
/* The sufficient decrease condition. */
if (param->linesearch == LBFGS_LINESEARCH_BACKTRACKING) {
if (param->linesearch == LBFGS_LINESEARCH_BACKTRACKING_STRONG) {
/* Check the strong Wolfe condition. */
vecdot(&dg, g, s, n);
if (dg > -wolfe * dginit) {