#ifndef FIELD_RATIONALS_H_INCLUDED #define FIELD_RATIONALS_H_INCLUDED #include <vector> #include <cstdio> #include <gmp.h> //remove? #include "vektor.h" #include "field.h" class FieldRationalsImplementation : public FieldImplementation { FieldElementImplementation *zHomomorphismImplementation(int n);/* Creates FieldElementImplementation object with refcount1 */ FieldElement zHomomorphism(int n); const char *name(); std::string toString()const; public: virtual bool isRationals()const; FieldRationalsImplementation(); }; /* class FieldRationals : public Field { public: FieldRationals(); }; */ //extern FieldRationals Q; extern Field Q; IntegerVector primitiveVector(vector<FieldElement> const &v); IntegerVector toIntegerVector(vector<FieldElement> const &v);// MUST HAVE INTEGER ENTRIES int toInteger(FieldElement const &a);// MUST BE INTEGER mpq_t *fieldElementToGmp(FieldElement const &c); FieldElement fieldElementFromGmp(mpq_t *c); FieldElement gcd(FieldElement const &a, FieldElement const &b, FieldElement &s, FieldElement &t); #endif