Removed the OW-LQN routine from line_search_backtracking_loose().
git-svn-id: file:///home/svnrepos/software/liblbfgs/trunk@43 ecf4c44f-38d1-4fa4-9757-a0b4dd0349fc
This commit is contained in:
parent
8fe5ce006d
commit
c8dcce4482
16
lib/lbfgs.c
16
lib/lbfgs.c
@ -746,11 +746,7 @@ static int line_search_backtracking_loose(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Compute the initial gradient in the search direction. */
|
/* Compute the initial gradient in the search direction. */
|
||||||
if (param->orthantwise_c != 0.) {
|
vecdot(&dginit, g, s, n);
|
||||||
dginit = owlqn_direction_line(x, g, s, param->orthantwise_c, param->orthantwise_start, param->orthantwise_end);
|
|
||||||
} else {
|
|
||||||
vecdot(&dginit, g, s, n);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Make sure that s points to a descent direction. */
|
/* Make sure that s points to a descent direction. */
|
||||||
if (0 < dginit) {
|
if (0 < dginit) {
|
||||||
@ -765,18 +761,8 @@ static int line_search_backtracking_loose(
|
|||||||
veccpy(x, xp, n);
|
veccpy(x, xp, n);
|
||||||
vecadd(x, s, *stp, n);
|
vecadd(x, s, *stp, n);
|
||||||
|
|
||||||
if (param->orthantwise_c != 0.) {
|
|
||||||
/* The current point is projected onto the orthant of the initial one. */
|
|
||||||
owlqn_project(x, xp, param->orthantwise_start, param->orthantwise_end);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Evaluate the function and gradient values. */
|
/* Evaluate the function and gradient values. */
|
||||||
*f = cd->proc_evaluate(cd->instance, x, g, cd->n, *stp);
|
*f = cd->proc_evaluate(cd->instance, x, g, cd->n, *stp);
|
||||||
if (0. < param->orthantwise_c) {
|
|
||||||
/* Compute the L1 norm of the variables and add it to the object value. */
|
|
||||||
norm = owlqn_x1norm(x, param->orthantwise_start, param->orthantwise_end);
|
|
||||||
*f += norm * param->orthantwise_c;
|
|
||||||
}
|
|
||||||
|
|
||||||
++count;
|
++count;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user