- Added comparison operators, and +=, -=, *=, /=.

This commit is contained in:
Sylvain Pion 1999-07-26 15:25:48 +00:00
parent 72d3ddb3ef
commit f0e2f24940
1 changed files with 19 additions and 0 deletions

View File

@ -68,6 +68,25 @@ struct Static_filter_error
Sfe operator- () const { return *this; }
Sfe operator/ (const Sfe &f) const { abort(); } // Division not supported.
Sfe& operator+=(const Sfe &f) { return *this = *this + f; }
Sfe& operator-=(const Sfe &f) { return *this = *this - f; }
Sfe& operator*=(const Sfe &f) { return *this = *this * f; }
Sfe& operator/=(const Sfe &f) { return *this = *this / f; }
bool operator< (const Sfe &f) const
{
double e;
compare(*this, f, e);
std::cerr << "Static error is" << e << endl;
abort();
return false;
}
bool operator> (const Sfe &f) const { return *this < f; }
bool operator<=(const Sfe &f) const { return *this < f; }
bool operator>=(const Sfe &f) const { return *this < f; }
bool operator==(const Sfe &f) const { return *this < f; }
bool operator!=(const Sfe &f) const { return *this < f; }
double error() const { return _e; }
double bound() const { return _b; }
int degree() const { return _d; }