3 #include "../formula/Formula.h"
11 template<
typename Poly>
30 CARL_LOG_INFO(
"carl.formula.symmetry",
"Tried to break symmetry on unsupported variable type " << x.
type());
38 template<
typename Poly>
40 constexpr
bool eliminateTrue =
true;
43 std::set<std::pair<Variable,Variable>> inEq;
44 for (
const auto& v: vars) {
45 if (v.first == v.second)
continue;
46 if (eliminateTrue && inEq.find(v) != inEq.end())
continue;
49 eq.emplace_back(createComparison<Poly>(v.first, v.second,
Relation::EQ));
50 if (eliminateTrue) inEq.emplace(v.second, v.first);
#define CARL_LOG_INFO(channel, msg)
carl is the main namespace for the library.
std::vector< Formula< Poly > > Formulas
std::vector< std::pair< Variable, Variable > > Symmetry
A symmetry represents a bijection on a set of variables.
Formula< Poly > lexLeaderConstraint(const Symmetry &vars)
Creates symmetry breaking constraints from the passed symmetries in the spirit of .
Formula< Poly > createComparison(Variable x, Variable y, Relation rel)
A Variable represents an algebraic variable that can be used throughout carl.
constexpr VariableType type() const noexcept
Retrieves the type of the variable.
Represent a polynomial (in)equality against zero.