17 underlying_set::insert_commit_data insert_data;
20 return res.first->mWeakPtr.lock();
22 auto shared = std::shared_ptr<Monomial>(
new Monomial(c, totalDegree));
24 shared.get()->mWeakPtr = shared;
25 mPool.insert_commit(*shared.get(), insert_data);
37 CARL_LOG_TRACE(
"carl.core.monomial", _exponents <<
", " << _totalDegree);
38 return add(std::move(_exponents), _totalDegree);
44 std::sort(
exp.begin(),
exp.end(), [](
const auto& p1,
const auto& p2) { return p1.first < p2.first; });
45 return add(std::move(
exp));
50 return add(std::move(_exponents), 0);
#define MONOMIAL_POOL_LOCK_GUARD
#define CARL_LOG_TRACE(channel, msg)
carl is the main namespace for the library.
std::size_t exponent
Type of an exponent.
Interval< Number > exp(const Interval< Number > &i)
A Variable represents an algebraic variable that can be used throughout carl.
The general-purpose monomials.
std::shared_ptr< const Monomial > Arg
std::vector< std::pair< Variable, std::size_t > > Content
underlying_set mPool
The pool.
Monomial::Arg create(Variable _var, exponent _exp)
Creates a monomial from a variable and an exponent.
Monomial::Arg add(Monomial::Content &&c, exponent totalDegree=0)