Removed some codes for OW-LQN experimentally.
git-svn-id: file:///home/svnrepos/software/liblbfgs/trunk@30 ecf4c44f-38d1-4fa4-9757-a0b4dd0349fc
This commit is contained in:
parent
fb183a2880
commit
51d079e829
15
lib/lbfgs.c
15
lib/lbfgs.c
@ -561,8 +561,6 @@ int lbfgs(
|
||||
vecncpy(d, g, n);
|
||||
} else {
|
||||
owlqn_direction(d, x, g, param.orthantwise_c, param.orthantwise_start, param.orthantwise_end);
|
||||
/* Store the steepest direction to w.*/
|
||||
veccpy(w, d, n);
|
||||
}
|
||||
|
||||
j = end;
|
||||
@ -588,17 +586,6 @@ int lbfgs(
|
||||
j = (j + 1) % m; /* if (++j == m) j = 0; */
|
||||
}
|
||||
|
||||
/*
|
||||
Constrain the search direction for orthant-wise updates.
|
||||
*/
|
||||
if (param.orthantwise_c != 0.) {
|
||||
for (i = param.orthantwise_start;i < param.orthantwise_end;++i) {
|
||||
if (d[i] * w[i] <= 0) {
|
||||
d[i] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Now the search direction d is ready. We try step = 1 first.
|
||||
*/
|
||||
@ -663,7 +650,7 @@ static int line_search_backtracking_owlqn(
|
||||
}
|
||||
|
||||
for (;;) {
|
||||
// Update the current point.
|
||||
/* Update the current point. */
|
||||
veccpy(x, xp, n);
|
||||
vecadd(x, s, *stp, n);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user