~ubuntu-branches/ubuntu/saucy/gfan/saucy-proposed

« back to all changes in this revision

Viewing changes to field_rationalfunctions.h

  • Committer: Package Import Robot
  • Author(s): Cédric Boutillier
  • Date: 2013-07-09 10:44:01 UTC
  • mfrom: (2.1.2 experimental)
  • Revision ID: package-import@ubuntu.com-20130709104401-5q66ozz5j5af0dak
Tags: 0.5+dfsg-3
* Upload to unstable.
* modify remove_failing_tests_on_32bits.patch to replace command of
  0009RenderStairCase test with an empty one instead of deleting it.
* remove lintian override about spelling error

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef FIELD_RATIONALFUNCTIONS_H_INCLUDED
 
2
#define FIELD_RATIONALFUNCTIONS_H_INCLUDED
 
3
 
 
4
#include "field.h"
 
5
#include <string>
 
6
#include "polynomial.h"
 
7
 
 
8
using namespace std;
 
9
 
 
10
class FieldRationalFunctionsImplementation : public FieldImplementation
 
11
{
 
12
  Field coefficientField;
 
13
  string parameterName;
 
14
  PolynomialRing thePolynomialRing;
 
15
  FieldElementImplementation *zHomomorphismImplementation(int n);/* Creates FieldElementImplementation object with refcount1 */
 
16
  FieldElement zHomomorphism(int n);
 
17
  const char *name();
 
18
  std::string toString()const;
 
19
public:
 
20
  virtual bool isRationals()const;
 
21
  FieldRationalFunctionsImplementation(Field const &f_, string const &parameterName_);
 
22
  PolynomialRing getPolynomialRing()const;
 
23
};
 
24
 
 
25
 
 
26
 
 
27
// Let's see how inheritance and slicing work together
 
28
class FieldRationalFunctions : public Field
 
29
{
 
30
public:
 
31
  FieldRationalFunctions(Field const &coefficientField, string const &parameterName);
 
32
  FieldElement exponent(int power);
 
33
  FieldElement fromCoefficientField(FieldElement const &c);
 
34
  /**
 
35
   This function gives a value in the coefficient field by substituting the perturbation variable by tvalue.
 
36
   In case the denominator becomes zero during this process the routine asserts.
 
37
   */
 
38
  FieldElement substitute(FieldElement const &e, FieldElement const &tvalue)const;
 
39
};
 
40
 
 
41
void testRationalFunctionField();//test routine
 
42
#endif