10 #include "../utils/DynamicPriorityQueue.h"
15 template<
typename Settings, Backtracking BT>
18 template<
typename S, Backtracking B>
27 return (cid ==
qe.cid) && (poly ==
qe.poly);
29 friend std::ostream&
operator<<(std::ostream& os,
const QueueEntry&
qe) {
30 return os <<
"(" <<
qe.poly <<
"," <<
qe.cid <<
")";
35 bool operator()(
const QueueEntry& lhs,
const QueueEntry& rhs)
const {
42 template<
typename ...Args>
49 mQueue.push(QueueEntry(p, cid, isBound));
50 return carl::Bitset();
53 auto it = mQueue.
find(QueueEntry(p, cid,
false));
54 if (it != mQueue.
end()) {
57 Super::removePolynomial(p, cid, isBound);
62 while (!mQueue.empty()) {
63 SMTRAT_LOG_DEBUG(
"smtrat.cad.projection",
"Using next polynomial " << mQueue.top() <<
" from " << mQueue);
64 carl::Bitset res = Super::addPolynomial(mQueue.top().poly, mQueue.top().cid, mQueue.top().isBound);
66 if (res.any())
return res;
68 return carl::Bitset();
72 template<
typename S, Backtracking B>
74 os <<
"Queue: " << p.mQueue << std::endl;
75 return os << static_cast<const Projection<Incrementality::NONE, Backtracking::UNORDERED, S>&>(p);
auto find(const T &t) const
auto erase(typename std::vector< T >::const_iterator it)
This class implements a projection that supports no incrementality and allows backtracking to be out ...
Projection(Args &&... args)
PriorityQueue< QueueEntry, PolynomialComparator > mQueue
void removePolynomial(const UPoly &p, std::size_t cid, bool isBound)
Removes the given polynomial from the projection.
carl::Bitset addPolynomial(const UPoly &p, std::size_t cid, bool isBound)
Adds the given polynomial to the projection.
carl::Bitset projectNewPolynomial(const ConstraintSelection &=carl::Bitset(true))
std::size_t complexity(const std::vector< FormulaT > &origin)
std::ostream & operator<<(std::ostream &os, const SampleIteratorQueue< I, C > &siq)
carl::UnivariatePolynomial< Poly > UPoly
carl::Bitset ConstraintSelection
std::optional< FormulaT > qe(const FormulaT &input)
Class to create the formulas for axioms.
const settings::Settings & Settings()
#define SMTRAT_LOG_DEBUG(channel, msg)
bool operator()(const QueueEntry &lhs, const QueueEntry &rhs) const
bool operator==(const QueueEntry &qe) const
QueueEntry(const UPoly &p, std::size_t c, bool b)
friend std::ostream & operator<<(std::ostream &os, const QueueEntry &qe)