11 template<
class,
class>
15template<
class KeyT =
idol::Var,
class ValueT =
double>
20 QuadExpr(ValueT t_constant) : m_affine(std::move(t_constant)) {}
21 QuadExpr(
const KeyT& t_key) : m_affine(std::move(t_key)) {}
28 QuadExpr(
const ValueT& t_factor,
const KeyT& t_key) : m_affine(t_factor, t_key) {}
29 QuadExpr(ValueT&& t_factor,
const KeyT& t_key) : m_affine(std::move(t_factor), t_key) {}
50 [[nodiscard]]
bool is_zero(
double t_tolerance)
const override;
55template<
class KeyT,
class ValueT>
61template<
class KeyT,
class ValueT>
63 return m_affine.is_zero(t_tolerance) && LinExpr<CommutativePair<KeyT>, ValueT>::is_zero(t_tolerance);
66template<
class KeyT,
class ValueT>
73template<
class KeyT,
class ValueT>
75 LinExpr<CommutativePair<KeyT>, ValueT>::operator/=(t_rhs);
80template<
class KeyT,
class ValueT>
82 LinExpr<CommutativePair<KeyT>, ValueT>::operator*=(t_rhs);
87template<
class KeyT,
class ValueT>
90 LinExpr<CommutativePair<KeyT>, ValueT>::operator-=(t_rhs);
91 m_affine -= t_rhs.m_affine;
95template<
class KeyT,
class ValueT>
98 LinExpr<CommutativePair<KeyT>, ValueT>::operator+=(t_rhs);
99 m_affine += t_rhs.m_affine;
106 template<
class KeyT,
class ValueT>
107 std::ostream& operator<<(std::ostream& t_os,
const QuadExpr<KeyT, ValueT>& t_expr) {
108 t_os << t_expr.affine() <<
" + " << (
const LinExpr<CommutativePair<KeyT>, ValueT>&) t_expr;