Skip to content

Commit

Permalink
remove template
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolajBjorner committed Nov 7, 2023
1 parent 77dab53 commit fb95760
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/math/lp/lar_term.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ class lar_term {

unsigned size() const { return static_cast<unsigned>(m_coeffs.size()); }

template <typename T>
const T & coeffs() const {
u_map<mpq> const & coeffs() const {
return m_coeffs;
}

Expand Down Expand Up @@ -97,9 +96,8 @@ class lar_term {

vector<std::pair<mpq, lpvar>> coeffs_as_vector() const {
vector<std::pair<mpq, lpvar>> ret;
for (const auto & p : m_coeffs) {
ret.push_back(std::make_pair(p.m_value, p.m_key));
}
for (const auto & [c, v] : m_coeffs)
ret.push_back({v, c});
return ret;
}

Expand Down

0 comments on commit fb95760

Please sign in to comment.