23 std::string
name() {
return "TotalizerEncoder"; }
53 assert(
mLeft !=
nullptr);
Base class for a PseudoBoolean Encoder.
TotalizerEncoder implements the Totalizer encoding as described in "Incremental Cardinality Constrain...
std::optional< FormulaT > doEncode(const ConstraintT &constraint)
Rational encodingSize(const ConstraintT &constraint)
FormulaT encodeCardinalityRestriction(TotalizerTree &tree, Rational constantPart)
std::map< carl::Variables, FormulaT > mSumPropagationFormulaCache
FormulaT encodeSumPropagation(TotalizerTree &tree)
std::map< carl::Variables, TotalizerTree * > mTreeCache
TotalizerTree buildTree(const std::set< carl::Variable > &variables)
bool canEncode(const ConstraintT &constraint)
std::vector< carl::Variable > mNodeVariables
std::vector< carl::Variable > variables()
TotalizerTree(const std::set< carl::Variable > &variables)
Class to create the formulas for axioms.
carl::Formula< Poly > FormulaT
carl::Constraint< Poly > ConstraintT