31 #ifndef QUADRATICINTEGER_SMALL_H 32 #define QUADRATICINTEGER_SMALL_H 65 virtual void set(
const int& n );
68 virtual void removeSquareFactors();
70 virtual bool bIsInvertible()
const;
71 virtual bool bIsSquareOfIvertible()
const;
77 virtual void multiplyBy(
const int& n );
83 virtual bool bIsLessThan(
const int& n )
const;
84 virtual bool bIsLessThan(
const long int& n )
const;
87 virtual bool bIsGreaterThan(
const int& n )
const;
88 virtual bool bIsGreaterThan(
const long int& n )
const;
89 virtual bool bIsGreaterOEThan(
const int& n )
const;
91 virtual bool bIsEqualTo(
const int& n )
const;
93 ostream& print( ostream& )
const;
94 virtual string to_string(
const string& strFormat =
"generic",
const bool& bProtect =
false )
const;
95 virtual double to_double()
const;
96 virtual string get_classname()
const;
98 long int floor()
const;
101 static bool bIsDAdmissible(
const unsigned int& d );
102 static void set_d(
const unsigned int& d );
103 static vector< QuadraticInteger > qiFactorsRationalPrime(
const unsigned int& iPrime,
bool bWithMultiplicities =
false );
104 static array< long int, 2 > iPellEquation(
const unsigned int& iPrime );
109 long int iNorm()
const;
110 long int iTrace()
const;
114 vector< QuadraticInteger > qiPrimeFactors()
const;
115 map< QuadraticInteger, unsigned int > qiPrimeDecomposition()
const;
135 #endif // QUADRATICINTEGER_H
static bool bIsOneMod4
True if d is 1 mod 4, false otherwise.
Definition: quadraticinteger.h:50
Quadratic integers.
Definition: quadraticinteger.h:44
static int d
We work in Q[ sqrt d ].
Definition: quadraticinteger.h:49
Parent class for rational, quadratic and rc7 integers.
Definition: algebraicinteger.h:43
long int a
First component of the quadratic integer (in the usual Z-basis)
Definition: quadraticinteger.h:47
static map< unsigned int, vector< long int > > iFundamentalUnits
Fundamental units.
Definition: quadraticinteger.h:54
long int b
Second component of the quadratic integer (in the usual Z-basis)
Definition: quadraticinteger.h:48
static int iDiscriminant
Discriminant of the quadratic field.
Definition: quadraticinteger.h:51
static map< unsigned int, vector< unsigned int > > iPellMinimalSolution
Solutions for the Pell equations (used to compute the decompositions of rational prime numbers) ...
Definition: quadraticinteger.h:53