Skip to content

Commit

Permalink
resolve PR commits
Browse files Browse the repository at this point in the history
  • Loading branch information
TolisChal committed Jul 17, 2024
1 parent 0b2b2cf commit fe99991
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions include/preprocess/rounding_util_functions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -389,13 +389,14 @@ void get_barrier_hessian_grad(MT const& A, MT const& A_trans, VT const& b,
} else if constexpr (BarrierType == EllipsoidType::VAIDYA_BARRIER)
{
const int m = b.size(), d = x.size();
NT const d_m = NT(d) / NT(m);
// Weighted gradient of the log barrier function
grad.noalias() = A_trans * s;
grad *= NT(d) / NT(m);
grad *= d_m;
// Add the gradient of the volumetric function
grad.noalias() += A_trans * (s.cwiseProduct(sigma));
// Weighted Hessian of the log barrier function
H *= NT(d) / NT(m);
H *= d_m;
// Add the Hessian of the volumetric function
MT Hvol(d, d);
update_Atrans_Diag_A<NT>(Hvol, A_trans, A, s_sq.cwiseProduct(sigma).asDiagonal());
Expand Down

0 comments on commit fe99991

Please sign in to comment.