Sophie

Sophie

distrib > Mandriva > 2011.0 > i586 > by-pkgid > e1c4a3050d44123471c4053e4926e965 > files > 160

gfan-debug-0.4plus-2mdv2011.0.i586.rpm

#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