3 #include "../MonomialPool.h"
8 if(!lhs && !rhs)
return nullptr;
13 assert(lhs->is_consistent());
14 assert(rhs->is_consistent());
17 std::size_t expsum = 0;
19 auto itright = rhs->begin();
20 auto leftEnd = lhs->end();
21 auto rightEnd = rhs->end();
22 for(
auto itleft = lhs->begin(); (itleft != leftEnd && itright != rightEnd);)
25 if(itleft->first == itright->first)
27 std::size_t newExp = std::min(itleft->second, itright->second);
28 newExps.emplace_back(itleft->first, newExp);
33 else if(itleft->first < itright->first)
39 assert(itleft->first > itright->first);
44 std::shared_ptr<const Monomial> result;
45 if (!newExps.empty()) {
#define CARL_LOG_FUNC(channel, args)
#define CARL_LOG_TRACE(channel, msg)
carl is the main namespace for the library.
Monomial::Arg createMonomial(T &&... t)
cln::cl_I gcd(const cln::cl_I &a, const cln::cl_I &b)
Calculate the greatest common divisor of two integers.
std::shared_ptr< const Monomial > Arg
std::vector< std::pair< Variable, std::size_t > > Content