3 #include <carl-common/util/streamingOperators.h>
4 #include <carl-common/datastructures/Bitset.h>
12 using carl::operator<<;
67 auto it = std::remove_if(
mData.begin(),
mData.end(), f);
89 [](
const auto& o){ return o.active(); }
94 void deactivate(std::size_t level,
const carl::Bitset& rhs) {
96 [level, &rhs](
auto& o){
97 if (o.level == level) o.deactivate(rhs);
103 for(
auto& it :
mData) {
104 if((it.level == level) && !rhs.test(it.first) && !rhs.test(it.second)) {
105 it.ec_active =
false;
111 void activate(std::size_t level,
const carl::Bitset& rhs) {
113 [level, &rhs](
auto& o){
114 if (o.level == level) o.activate(rhs);
119 void activateEC(std::size_t level,
const carl::Bitset& rhs) {
120 for(
auto& it :
mData) {
121 if((it.level == level) && !rhs.test(it.first) && !rhs.test(it.second)) {
132 mData = std::move(rhs.mData);
137 return mData.empty();
145 mData.emplace_back(rhs);
167 return os << po.
mData;
This class represents one or more origins of some object.
Origin & erase(std::size_t level, const carl::Bitset &rhs)
Origin & operator+=(const BaseType &rhs)
Adds the pair to the origins.
void activate(std::size_t level, const carl::Bitset &rhs)
void deactivateEC(std::size_t level, const carl::Bitset &rhs)
friend std::ostream & operator<<(std::ostream &os, const Origin &po)
Origin(std::size_t level, std::size_t id)
Origin & operator=(Origin &&rhs)
Origin operator|(const Origin &rhs) const
Origin & operator-=(const BaseType &rhs)
Removes the pair from the origins.
bool operator==(const Origin &rhs) const
void activateEC(std::size_t level, const carl::Bitset &rhs)
Origin & operator=(const Origin &rhs)
void deactivate(std::size_t level, const carl::Bitset &rhs)
std::vector< BaseType > mData
Origin(const BaseType &bt)
void removeFiltered(F &&f)
void sort(T *array, int size, LessThan lt)
Class to create the formulas for axioms.
friend std::ostream & operator<<(std::ostream &os, const BaseType &bt)
bool operator==(const BaseType &bt) const
void deactivate(const carl::Bitset &ids)
void activate(const carl::Bitset &ids)
bool operator<(const BaseType &bt) const
BaseType(std::size_t lvl, std::size_t id1, std::size_t id2)
BaseType(std::size_t level, std::size_t id)