Sophie

Sophie

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

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

#ifndef FIELD_RATIONALFUNCTIONS_H_INCLUDED
#define FIELD_RATIONALFUNCTIONS_H_INCLUDED

#include "field.h"
#include <string>
#include "polynomial.h"

using namespace std;

class FieldRationalFunctionsImplementation : public FieldImplementation
{
  Field coefficientField;
  string parameterName;
  PolynomialRing thePolynomialRing;
  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;
  FieldRationalFunctionsImplementation(Field const &f_, string const &parameterName_);
  PolynomialRing getPolynomialRing()const;
};



// Let's see how inheritance and slicing works together
class FieldRationalFunctions : public Field
{
public:
  FieldRationalFunctions(Field const &coefficientField, string const &parameterName);
  FieldElement exponent(int power);
  /**
   This function gives a value in the coefficient field by substituting the perturbation variable by tvalue.
   In case the denominator becomes zero during this process the routine asserts.
   */
  FieldElement substitute(FieldElement const &e, FieldElement const &tvalue)const;
};

void testRationalFunctionField();//test routine
#endif