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:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user