Added one more experimental code.

git-svn-id: file:///home/svnrepos/software/liblbfgs/trunk@34 ecf4c44f-38d1-4fa4-9757-a0b4dd0349fc
This commit is contained in:
naoaki 2009-02-16 06:58:11 +00:00
parent 9df185fd7b
commit 711675ae91

View File

@ -603,6 +603,14 @@ int lbfgs(
j = (j + 1) % m; /* if (++j == m) j = 0; */ j = (j + 1) % m; /* if (++j == m) j = 0; */
} }
if (param.orthantwise_c != 0.) {
vecdot(&gnorm, d, pg, n);
if (gnorm > 0) {
vecncpy(gp, pg, n);
owlqn_project(d, gp, 0, n);
}
}
/* /*
Now the search direction d is ready. We try step = 1 first. Now the search direction d is ready. We try step = 1 first.
*/ */