diff options
Diffstat (limited to 'mtxinteger.h')
-rw-r--r-- | mtxinteger.h | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/mtxinteger.h b/mtxinteger.h index 39ab74c..8c30b14 100644 --- a/mtxinteger.h +++ b/mtxinteger.h @@ -27,56 +27,56 @@ class MtxInteger char *digits; int sign; - void setDigits (const char *digits); - MtxInteger divideByTwo () const; - MtxInteger divide (const MtxInteger &integer, bool modulo0) const; + void setDigits(const char *digits); + MtxInteger divideByTwo() const; + MtxInteger divide(const MtxInteger &integer, bool modulo0) const; public: - MtxInteger (); - MtxInteger (int integer); - MtxInteger (unsigned int integer); - MtxInteger (double integer); - MtxInteger (const char *digits); - MtxInteger (const MtxInteger &integer); - ~MtxInteger (); - MtxInteger & operator= (const MtxInteger &integer); - MtxInteger operator+ () const; - MtxInteger operator- () const; - bool operator== (const MtxInteger &integer) const; - bool operator!= (const MtxInteger &integer) const; - bool operator> (const MtxInteger &integer) const; - bool operator>= (const MtxInteger &integer) const; - bool operator< (const MtxInteger &integer) const; - bool operator<= (const MtxInteger &integer) const; - MtxInteger operator+ (const MtxInteger &integer) const; - MtxInteger & operator++ (); - MtxInteger & operator++ (int a); - MtxInteger & operator+= (const MtxInteger &integer); - MtxInteger operator- (const MtxInteger &integer) const; - MtxInteger & operator-- (); - MtxInteger & operator-- (int a); - MtxInteger & operator-= (const MtxInteger &integer); - MtxInteger operator* (const MtxInteger &integer) const; - MtxInteger & operator*= (const MtxInteger &integer); - MtxInteger operator/ (const MtxInteger &integer) const; - MtxInteger & operator/= (const MtxInteger &integer); - MtxInteger operator% (const MtxInteger &integer) const; - MtxInteger & operator%= (const MtxInteger &integer); - int getSign () const; - MtxInteger abs () const; - void display () const; - char * toString () const; - int toInt () const; - static char * parseInt (int n); - static char * parseInt (unsigned int n); - static char * parseDouble (double d); + MtxInteger(); + MtxInteger(int integer); + MtxInteger(unsigned int integer); + MtxInteger(double integer); + MtxInteger(const char *digits); + MtxInteger(const MtxInteger &integer); + ~MtxInteger(); + MtxInteger & operator=(const MtxInteger &integer); + MtxInteger operator+() const; + MtxInteger operator-() const; + bool operator==(const MtxInteger &integer) const; + bool operator!=(const MtxInteger &integer) const; + bool operator>(const MtxInteger &integer) const; + bool operator>=(const MtxInteger &integer) const; + bool operator<(const MtxInteger &integer) const; + bool operator<=(const MtxInteger &integer) const; + MtxInteger operator+(const MtxInteger &integer) const; + MtxInteger & operator++(); + MtxInteger & operator++(int a); + MtxInteger & operator+=(const MtxInteger &integer); + MtxInteger operator-(const MtxInteger &integer) const; + MtxInteger & operator--(); + MtxInteger & operator--(int a); + MtxInteger & operator-=(const MtxInteger &integer); + MtxInteger operator*(const MtxInteger &integer) const; + MtxInteger & operator*=(const MtxInteger &integer); + MtxInteger operator/(const MtxInteger &integer) const; + MtxInteger & operator/=(const MtxInteger &integer); + MtxInteger operator%(const MtxInteger &integer) const; + MtxInteger & operator%=(const MtxInteger &integer); + int getSign() const; + MtxInteger abs() const; + void display() const; + char * toString() const; + int toInt() const; + static char * parseInt(int n); + static char * parseInt(unsigned int n); + static char * parseDouble(double d); /* * Return integer0 * 10^power. */ - static MtxInteger MtxInteger::pot (int integer0, unsigned int power); + static MtxInteger MtxInteger::pot(int integer0, unsigned int power); - static MtxInteger gcd (MtxInteger a, MtxInteger b); + static MtxInteger gcd(MtxInteger a, MtxInteger b); }; #endif /* _MTXINTEGER_H */ |