Skip to content

Commit 839b710

Browse files
add ability to multiply term
1 parent 0ebd8d6 commit 839b710

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/math/lp/lar_term.h

+6
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,12 @@ class lar_term {
138138
}
139139
return ret;
140140
}
141+
142+
lar_term& operator*=(mpq const& k) {
143+
for (auto & t : m_coeffs)
144+
t.m_value *= k;
145+
return *this;
146+
}
141147

142148
void clear() {
143149
m_coeffs.reset();

0 commit comments

Comments
 (0)