Basic Polynomial Algebra Subprograms (BPAS)  v. 1.791
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  * @param other: the other element to get a gcd with.
22  * @return the gcd.
23  */
24  virtual Derived gcd(const Derived& other) const = 0;
25 
26  /**
27  * Compute squarefree factorization of *this.
28  *
29  * @return the square free factorization as a Factors object.
30  */
31  virtual Factors<Derived> squareFree() const = 0;
32 
33 };
34 
35 #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