add inital smoothing of the circuit
This commit is contained in:
@@ -150,7 +150,7 @@ LiftedWCNF::LiftedWCNF (const ParfactorList& pfList)
|
||||
{
|
||||
addIndicatorClauses (pfList);
|
||||
addParameterClauses (pfList);
|
||||
printFormulasToIndicators();
|
||||
printFormulaIndicators();
|
||||
printClauses();
|
||||
}
|
||||
|
||||
@@ -163,6 +163,31 @@ LiftedWCNF::~LiftedWCNF (void)
|
||||
|
||||
|
||||
|
||||
Clause
|
||||
LiftedWCNF::createClauseForLiteral (LiteralId lid) const
|
||||
{
|
||||
for (size_t i = 0; i < clauses_.size(); i++) {
|
||||
const Literals& literals = clauses_[i].literals();
|
||||
for (size_t j = 0; j < literals.size(); j++) {
|
||||
if (literals[j].lid() == lid) {
|
||||
ConstraintTree* ct = new ConstraintTree (*clauses_[i].constr());
|
||||
ct->project (literals[j].logVars());
|
||||
Clause clause (ct);
|
||||
clause.addLiteral (literals[j]);
|
||||
return clause;
|
||||
}
|
||||
}
|
||||
}
|
||||
// FIXME
|
||||
Clause c (new ConstraintTree({}));
|
||||
c.addLiteral (Literal (lid,{}));
|
||||
return c;
|
||||
//assert (false);
|
||||
//return Clause (0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
LiftedWCNF::addIndicatorClauses (const ParfactorList& pfList)
|
||||
{
|
||||
@@ -245,7 +270,7 @@ LiftedWCNF::printClauses (void) const
|
||||
|
||||
|
||||
void
|
||||
LiftedWCNF::printFormulasToIndicators (void) const
|
||||
LiftedWCNF::printFormulaIndicators (void) const
|
||||
{
|
||||
set<PrvGroup> allGroups;
|
||||
ParfactorList::const_iterator it = pfList_.begin();
|
||||
|
Reference in New Issue
Block a user