45 if((
b != 0 && e.
a != 0) ||
46 (
a != 0 && e.
b != 0) ||
47 (
a != 0 && e.
a != 0)){
48 std::cout <<
"(" << *
this <<
") * (" << e <<
")" 49 <<
" does not result in a quadratic expression." << std::endl;
55 ret.
b =
c*e.
b +
b*e.
c;
69 return a*x*x +
b*x +
c;
QuadExpr & operator-=(const QuadExpr &e)
QuadExpr operator*(const QuadExpr &e) const
QuadExpr & operator+=(const QuadExpr &e)
std::ostream & operator<<(std::ostream &os, const QuadExpr &e)
QuadExpr operator-(const QuadExpr &e) const
QuadExpr & operator*=(const QuadExpr &e)
double Eval(double x) const
QuadExpr operator+(const QuadExpr &e) const