Skip to content

Commit

Permalink
Fix mu and lambda update in SubspaceMin.
Browse files Browse the repository at this point in the history
  • Loading branch information
mpayrits committed Apr 25, 2022
1 parent 534c27e commit da09a7c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions include/LBFGSpp/SubspaceMin.h
Original file line number Diff line number Diff line change
Expand Up @@ -250,17 +250,17 @@ class SubspaceMin
{
Vector res;
bfgs.apply_PtWMv(L_set, Fy, res, Scalar(-1));
res.noalias() += subvec(vecc, yL_set);
res.noalias() += subvec(vecc, yL_set) + bfgs.theta() * subvec(vecy, yL_set);
subvec_assign(lambda, yL_set, res);
}

// Solve mu[U] = -B[U, F] * y - c[U]
if(nU > 0)
{
Vector res;
bfgs.apply_PtWMv(U_set, Fy, res, Scalar(-1));
res.noalias() = -res - subvec(vecc, yU_set);
subvec_assign(mu, yU_set, res);
Vector negRes;
bfgs.apply_PtWMv(U_set, Fy, negRes, Scalar(-1));
negRes.noalias() += subvec(vecc, yU_set) + bfgs.theta() * subvec(vecy, yU_set);
subvec_assign(mu, yU_set, -negRes);
}

// Test convergence
Expand Down

0 comments on commit da09a7c

Please sign in to comment.