Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

relace isSame with == operator

  • Loading branch information...
commit 9cea8cbacbd965648f67fe0e5ff2030fb395a4d9 1 parent d18fde0
@tom111 authored
Showing with 3 additions and 2 deletions.
  1. +2 −1  cpp/monomial.cpp
  2. +1 −1  cpp/monomial.h
View
3  cpp/monomial.cpp
@@ -99,7 +99,8 @@ long Monomial::degree() const {
return result;
};
-bool Monomial::isSame (const Monomial& m) const {
+bool Monomial::operator== (const Monomial& m) const {
+ if (length != m.length) return false;
for (int i=0; i<length; i++){
if ( (*exponents)[i] != (*m.exponents)[i]) { return false; };
};
View
2  cpp/monomial.h
@@ -61,7 +61,7 @@ class Monomial {
// Monomial* divide (Monomial *m);
long degree() const;
- bool isSame (const Monomial& m) const;
+ bool operator== (const Monomial& m) const;
Monomial* applyBinomialSafe (const Binomial& b) const;
Monomial* applyBinomialSafeReverse (const Binomial& b) const;
bool isProper () const;
Please sign in to comment.
Something went wrong with that request. Please try again.