Skip to content

Commit

Permalink
remove NT typename from max_step()
Browse files Browse the repository at this point in the history
  • Loading branch information
TolisChal committed Jul 7, 2024
1 parent 9d5a13f commit 259ddc8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/preprocess/barrier_center_ellipsoid.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ std::tuple<MT_dense, VT, bool> barrier_center_ellipsoid_linear_ineq(MT const& A
d.noalias() = - solve_vec<NT>(llt, H, grad);
Ad.noalias() = A * d;
// Compute the step length
step = std::min(max_step_multiplier * get_max_step<VT, NT>(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;
Expand Down
5 changes: 3 additions & 2 deletions include/preprocess/rounding_util_functions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ struct AssertBarrierFalseType : std::false_type {};
template <typename T>
struct AssertFalseType : std::false_type {};

template <typename VT, typename NT>
NT get_max_step(VT const& Ad, VT const& b_Ax)
template <typename VT>
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<NT>::lowest(), max_element_temp;
for (int i = 0; i < m; i++) {
Expand Down

0 comments on commit 259ddc8

Please sign in to comment.