diff --git a/include/preprocess/inscribed_ellipsoid_rounding.hpp b/include/preprocess/inscribed_ellipsoid_rounding.hpp index 31d22eb2a..c4beafe96 100644 --- a/include/preprocess/inscribed_ellipsoid_rounding.hpp +++ b/include/preprocess/inscribed_ellipsoid_rounding.hpp @@ -16,20 +16,21 @@ #include "preprocess/feasible_point.hpp" -template -inline static std::tuple -compute_inscribed_ellipsoid(Custom_MT A, VT b, VT const& x0, +// Using MT as to deal with both dense and sparse matrices, MT_dense will be the type of result matrix +template +inline static std::tuple +compute_inscribed_ellipsoid(MT A, VT b, VT const& x0, unsigned int const& maxiter, NT const& tol, NT const& reg) { if constexpr (ellipsoid_type == EllipsoidType::MAX_ELLIPSOID) { - return max_inscribed_ellipsoid(A, b, x0, maxiter, tol, reg); + return max_inscribed_ellipsoid(A, b, x0, maxiter, tol, reg); } else if constexpr (ellipsoid_type == EllipsoidType::LOG_BARRIER || ellipsoid_type == EllipsoidType::VOLUMETRIC_BARRIER || ellipsoid_type == EllipsoidType::VAIDYA_BARRIER) { - return barrier_center_ellipsoid_linear_ineq(A, b, x0); + return barrier_center_ellipsoid_linear_ineq(A, b, x0); } else { std::runtime_error("Unknown rounding method."); @@ -124,8 +125,7 @@ std::tuple inscribed_ellipsoid_rounding(Polytope &P, iter++; } - std::tuple result = std::make_tuple(T, shift, std::abs(round_val)); - return result; + return std::make_tuple(T, shift, std::abs(round_val)); } #endif