carl  24.04
Computer ARithmetic Library
CoCoAAdaptor.cpp
Go to the documentation of this file.
1 #include "CoCoAAdaptor.h"
2 
3 #ifdef USE_COCOA
4 
5 #include <CoCoA/library.H>
6 
7 namespace carl {
8 namespace cocoawrapper {
9 
10 CoCoA::RingElem gcd(const CoCoA::RingElem& p, const CoCoA::RingElem& q) {
11  return CoCoA::gcd(p, q);
12 }
13 CoCoA::factorization<CoCoA::RingElem> factor(const CoCoA::RingElem& p) {
14  return CoCoA::factor(p);
15 }
16 std::vector<CoCoA::RingElem> ReducedGBasis(const std::vector<CoCoA::RingElem>& p) {
17  return CoCoA::ReducedGBasis(CoCoA::ideal(p));
18 }
19 CoCoA::factorization<CoCoA::RingElem> SqFreeFactor(const CoCoA::RingElem& p) {
20  return CoCoA::factor(p);
21 }
22 
23 }
24 }
25 
26 #endif
carl is the main namespace for the library.
cln::cl_I gcd(const cln::cl_I &a, const cln::cl_I &b)
Calculate the greatest common divisor of two integers.
Definition: operations.h:310