diff --git a/include/preprocess/barrier_center_ellipsoid.hpp b/include/preprocess/barrier_center_ellipsoid.hpp index ecab24d40..0ab8c0457 100644 --- a/include/preprocess/barrier_center_ellipsoid.hpp +++ b/include/preprocess/barrier_center_ellipsoid.hpp @@ -69,7 +69,7 @@ std::tuple barrier_center_ellipsoid_linear_ineq(MT const& A d.noalias() = - solve_vec(llt, H, grad); Ad.noalias() = A * d; // Compute the step length - step = std::min(max_step_multiplier * get_max_step(Ad, b_Ax), step_iter); + step = std::min(max_step_multiplier * get_max_step(Ad, b_Ax), step_iter); step_d.noalias() = step*d; x_prev = x; x += step_d; diff --git a/include/preprocess/rounding_util_functions.hpp b/include/preprocess/rounding_util_functions.hpp index 1ee859b25..6b94ace8b 100644 --- a/include/preprocess/rounding_util_functions.hpp +++ b/include/preprocess/rounding_util_functions.hpp @@ -31,9 +31,10 @@ struct AssertBarrierFalseType : std::false_type {}; template struct AssertFalseType : std::false_type {}; -template -NT get_max_step(VT const& Ad, VT const& b_Ax) +template +auto get_max_step(VT const& Ad, VT const& b_Ax) { + using NT = typename VT::Scalar; const int m = Ad.size(); NT max_element = std::numeric_limits::lowest(), max_element_temp; for (int i = 0; i < m; i++) {