31 #ifndef RATIONALINTEGER_H 32 #define RATIONALINTEGER_H 49 virtual void set(
const int& n );
75 ostream&
print( ostream& )
const;
76 virtual string to_string(
const string& strFormat =
"generic",
const bool& bProtect =
false )
const;
80 long int get_iValue()
const;
94 bool operator==(
const long int& )
const;
99 #endif // RATIONALINTEGER_H virtual void gcd(const AlgebraicInteger *ai)
*this becomes the gcd of *this and the parameter
Definition: rationalinteger.cpp:53
virtual void divideBy(const AlgebraicInteger *ai)
Performs the division of *this by the parameter Remark: we do not check that the *this is divisible b...
Definition: rationalinteger.cpp:171
virtual void multiplyBy(const int &n)
Performs the multiplication of *this by the parameter.
Definition: rationalinteger.cpp:181
virtual void add(const AlgebraicInteger *ai)
Performs the addition of *this by the parameter.
Definition: rationalinteger.cpp:176
ostream & print(ostream &) const
Print the number.
Definition: rationalinteger.cpp:201
AlgebraicInteger * copy() const
Create a copy of an algebraic integer.
Definition: rationalinteger.cpp:27
virtual bool bIsLessOEThan(const AlgebraicInteger &ai) const
Check whether *this <= ai.
Definition: rationalinteger.cpp:123
AlgebraicInteger * aiCopyToInteger(const int &n) const
Create an algebraic integer from an integer.
Definition: rationalinteger.cpp:22
virtual double to_double() const
Convert to double (approximation)
Definition: rationalinteger.cpp:213
virtual bool bIsDivisbleBy(const AlgebraicInteger *) const
Check whether *this is divisible by the parameter.
Definition: rationalinteger.cpp:154
virtual void substract(const AlgebraicInteger *ai)
Substracts the parameter from *this.
Definition: rationalinteger.cpp:191
virtual bool bIsGreaterThan(const int &n) const
Check whether *this > n.
Definition: rationalinteger.cpp:134
virtual void removeSquareFactors()
Remove all the square factors of the algebraic integer.
Definition: rationalinteger.cpp:74
Parent class for rational, quadratic and rc7 integers.
Definition: algebraicinteger.h:43
virtual bool bIsInvertible() const
Check whether the number is invertible.
Definition: rationalinteger.cpp:43
virtual bool bIsLessThan(const int &n) const
Check whether *this < n.
Definition: rationalinteger.cpp:129
virtual string get_classname() const
Return the type (string)
Definition: rationalinteger.cpp:218
virtual bool bIsSquareOfIvertible() const
Check whether the number is the square of an invertible element.
Definition: rationalinteger.cpp:48
virtual string to_string(const string &strFormat="generic", const bool &bProtect=false) const
Convert to string.
Definition: rationalinteger.cpp:208
Rational integers.
Definition: rationalinteger.h:36
virtual void opp()
Computes the opp.
Definition: rationalinteger.cpp:196
virtual bool bIsEqualTo(const AlgebraicInteger &ai) const
Check whether *this == ai.
Definition: rationalinteger.cpp:144
virtual bool bIsGreaterOEThan(const int &n) const
Check whether *this >= n.
Definition: rationalinteger.cpp:139