IPG: verify that the root log vars appear in the same positions

This commit is contained in:
Tiago Gomes
2012-11-06 23:35:14 +00:00
parent 1e38743462
commit 06a59ad659
4 changed files with 52 additions and 26 deletions

View File

@@ -17,6 +17,14 @@ Literal::isGround (ConstraintTree constr, LogVarSet ipgLogVars) const
size_t
Literal::indexOfLogVar (LogVar X) const
{
return Util::indexOf (logVars_, X);
}
string
Literal::toString (
LogVarSet ipgLogVars,
@@ -344,17 +352,17 @@ LiftedWCNF::LiftedWCNF (const ParfactorList& pfList)
c1.addLiteral (Literal (0, LogVars() = {0}));
c1.addLiteralNegated (Literal (1, {0,1}));
clauses_.push_back(c1);
Clause c2 (names);
c2.addLiteral (Literal (0, LogVars()={0}));
c2.addLiteralNegated (Literal (1, {1,0}));
clauses_.push_back(c2);
addWeight (0, 3.0, 4.0);
addWeight (1, 2.0, 5.0);
freeLiteralId_ = 2;
cout << "FORMULA INDICATORS:" << endl;
// printFormulaIndicators();
cout << endl;