Basic Polynomial Algebra Subprograms (BPAS)  v. 1.652
BPASGCDDomain.hpp
1 
2 #ifndef _BPAS_GCD_DOMAIN_H_
3 #define _BPAS_GCD_DOMAIN_H_
4 
5 #include "BPASIntegralDomain.hpp"
6 #include "../Utils/TemplateHelpers.hpp"
7 #include "../DataStructures/Factors.hpp"
8 
9 
10 /**
11  * An abstract class defining the interface of a GCD domain.
12  */
13 template <class Derived>
14 class BPASGCDDomain : public virtual BPASIntegralDomain<Derived> {
15 
16 public:
17 
18  /**
19  * Get GCD of *this and other.
20  */
21  virtual Derived gcd(const Derived& other) const = 0;
22 
23  /**
24  * Compute squarefree factorization of *this
25  */
26  virtual Factors<Derived> squareFree() const = 0;
27 
28 };
29 
30 #endif
An abstract class defining the interface of a GCD domain.
Definition: BPASGCDDomain.hpp:14
virtual Derived gcd(const Derived &other) const =0
Get GCD of *this and other.
A simple data structure for encapsulating a collection of Factor elements.
Definition: Factors.hpp:95
virtual Factors< Derived > squareFree() const =0
Compute squarefree factorization of *this.
An abstract class defining the interface of an integral domain.
Definition: BPASIntegralDomain.hpp:14