24 template<
typename Number>
41 mutable std::map<Polynomial, QueryResultType>
mCache;
46 template<
typename InputIt>
48 CARL_LOG_TRACE(
"carl.thom.tarski.manager",
"setting up a taq manager on " << std::vector<Polynomial>(first, last));
50 if(std::distance(first, last) == 1 && first->is_univariate()) {
51 CARL_LOG_TRACE(
"carl.thom.tarski.manager",
"as a UNIVARIATE manager");
59 CARL_LOG_TRACE(
"carl.thom.tarski.manager",
"as a MULTIVARIATE manager");
67 std::cout <<
"aborting because it was tried to set up a tarki query manager on a non zero-dimensional zero set" << std::endl;
77 CARL_LOG_TRACE(
"carl.thom.tarski.manager",
"computing taq on " << p <<
" ... ");
83 CARL_LOG_TRACE(
"carl.thom.tarski.manager",
"found in cache: " << res);
94 "cannot compute tarski query of " << p <<
" on " <<
mZ);
121 return mTab.baseReprToPolynomial(
mTab.reduce(a * b));
140 res = int(
sgn(p.
lcoeff())) * (it->second);
#define CARL_LOG_TRACE(channel, msg)
#define CARL_LOG_ASSERT(channel, condition, msg)
carl is the main namespace for the library.
UnivariatePolynomial< C > to_univariate_polynomial(const MultivariatePolynomial< C, O, P > &p)
Convert a univariate polynomial that is currently (mis)represented by a 'MultivariatePolynomial' into...
const T & derivative(const T &t, Variable, std::size_t n=1)
Computes the n'th derivative of a number, which is either the number itself (for n = 0) or zero.
bool is_zero(const Interval< Number > &i)
Check if this interval is a point-interval containing 0.
int multivariateTarskiQuery(const MultivariatePolynomial< Number > &Q, const MultiplicationTable< Number > &table)
Sign sgn(const Number &n)
Obtain the sign of the given number.
int univariateTarskiQuery(const UnivariatePolynomial< Number > &p, const UnivariatePolynomial< Number > &q, const UnivariatePolynomial< Number > &der_q)
static const Variable NO_VARIABLE
Instance of an invalid variable.
Variable main_var() const
Retrieves the main variable of this polynomial.
bool is_constant() const
Check if the polynomial is constant.
bool is_univariate() const
Checks whether only one variable occurs.
const Coeff & lcoeff() const
Returns the coefficient of the leading term.
MultivariatePolynomial normalize() const
For a polynomial p, returns p/lc(p)
bool isTrivialBase() const
bool hasFiniteMon() const
TarskiQueryManager()=default
MultiplicationTable< Number > mTab
QueryResultType operator()(const Polynomial &p) const
Polynomial reduceProduct(const Polynomial &a, const Polynomial &b) const
bool isUnivariateManager() const
std::map< Polynomial, QueryResultType > mCache
void cache(const Polynomial &p, const QueryResultType res) const
MultivariatePolynomial< Number > Polynomial
UnivariatePolynomial< Number > mZ
QueryResultType operator()(const Number &c) const
UnivariatePolynomial< Number > mDer
bool getCached(const Polynomial &p, QueryResultType &res) const
TarskiQueryManager(InputIt first, InputIt last)