Basic Polynomial Algebra Subprograms (BPAS)  v. 1.791
BPASFieldOfFractions.hpp
1 
2 #ifndef _BPAS_FIELD_OF_FRACTIONS_
3 #define _BPAS_FIELD_OF_FRACTIONS_
4 
5 #include "BPASField.hpp"
6 #include "../Utils/TemplateHelpers.hpp"
7 
8 
9 
10 /**
11  * An abstract class defining the interface of a field of fractions.
12  * The field is templated by a generic GCD domain.
13  * The GCD domain must be a BPASGCDDomain.
14  */
15 template <class Domain, class Derived>
16 class BPASFieldOfFractions : public virtual BPASField<Derived>, private Derived_from<Domain, BPASGCDDomain<Domain>> {
17  public:
18 
19  /**
20  * Canonicalize this fraction, reducing terms as needed.
21  */
22  virtual void canonicalize() = 0;
23 
24  /**
25  * Get the fraction's numerator.
26  *
27  * @return the numerator.
28  */
29  virtual Domain numerator() const = 0;
30 
31  /**
32  * Get the fraction's denominator.
33  * @return the denominator
34  */
35  virtual Domain denominator() const = 0;
36 };
37 
38 #endif
An abstract class defining the interface of a field of fractions.
Definition: BPASFieldOfFractions.hpp:16
virtual Domain denominator() const =0
Get the fraction&#39;s denominator.
virtual void canonicalize()=0
Canonicalize this fraction, reducing terms as needed.
virtual Domain numerator() const =0
Get the fraction&#39;s numerator.
An abstract class defining the interface of a field.
Definition: BPASField.hpp:11