26 for (
const auto t : i) {
37 res.filter_bool =
false;
38 res.filter_real =
false;
39 res.filter_int =
false;
40 res.filter_uninterpreted =
false;
41 res.filter_bitvector =
false;
42 for (
const auto t : i) {
87 using iterator = std::vector<Variable>::iterator;
106 template<
typename Iterator>
148 template<
typename Iterator>
151 [
this](
const auto& v){
153 mVariables.emplace_back(v);
154 ++mAddedSinceCompact;
160 void add(std::initializer_list<Variable> i) {
161 add(i.begin(), i.end());
carl is the main namespace for the library.
carlVariables arithmetic_variables(const T &t)
void swap(Variable &lhs, Variable &rhs)
carlVariables real_variables(const T &t)
carlVariables uninterpreted_variables(const T &t)
std::ostream & operator<<(std::ostream &os, const BasicConstraint< Poly > &c)
Prints the given constraint on the given stream.
carlVariables bitvector_variables(const T &t)
VariableType
Several types of variables are supported.
carlVariables boolean_variables(const T &t)
bool operator==(const BasicConstraint< P > &lhs, const BasicConstraint< P > &rhs)
carlVariables integer_variables(const T &t)
void variables(const BasicConstraint< Pol > &c, carlVariables &vars)
PositionIteratorType Iterator
A Variable represents an algebraic variable that can be used throughout carl.
constexpr VariableType type() const noexcept
Retrieves the type of the variable.
bool apply(Variable v) const
static variable_type_filter excluding(std::initializer_list< VariableType > i)
static variable_type_filter only(std::initializer_list< VariableType > i)
static auto uninterpreted()
bool filter_uninterpreted
bool apply(VariableType v) const
static variable_type_filter all()
void add(const Iterator &b, const Iterator &e)
friend std::ostream & operator<<(std::ostream &os, const carlVariables &vars)
std::size_t mAddedSinceCompact
carlVariables(const Iterator &b, const Iterator &e, variable_type_filter filter=variable_type_filter::all())
const std::vector< Variable > & as_vector() const
std::set< Variable > as_set() const
variable_type_filter mFilter
void add(std::initializer_list< Variable > i)
carlVariables filter(variable_type_filter &&f) const
std::vector< Variable > mVariables
std::vector< Variable >::const_iterator const_iterator
bool has(Variable var) const
void compact(bool force=false) const
std::vector< Variable >::iterator iterator
carlVariables(std::initializer_list< Variable > i, variable_type_filter filter=variable_type_filter::all())
carlVariables(variable_type_filter filter=variable_type_filter::all())
auto uninterpreted() const
friend bool operator==(const carlVariables &lhs, const carlVariables &rhs)