remove grounding stub form lifted knowledge compilation. its hard to implement

This commit is contained in:
Tiago Gomes 2012-11-22 16:34:24 +00:00
parent 4afe6c8161
commit e09c25bd59
2 changed files with 0 additions and 44 deletions

View File

@ -18,11 +18,6 @@ AndNode::weight (void) const
{
double lw = leftBranch_->weight();
double rw = rightBranch_->weight();
if (Globals::logDomain) {
// cout << "andw1 = " << std::exp(lw + rw) << endl;
} else {
// cout << "andw2 = " << lw * rw << endl;
}
return Globals::logDomain ? lw + rw : lw * rw;
}
@ -251,10 +246,6 @@ LiftedCircuit::compile (
return;
}
if (tryGrounding (follow, clauses)) {
return;
}
// assert (false);
*follow = new CompilationFailedNode (clauses);
}
@ -266,11 +257,8 @@ LiftedCircuit::tryUnitPropagation (
CircuitNode** follow,
Clauses& clauses)
{
// cout << "ALL CLAUSES:" << endl;
// Clause::printClauses (clauses);
for (size_t i = 0; i < clauses.size(); i++) {
if (clauses[i].isUnit()) {
// cout << clauses[i] << " is unit!" << endl;
Clauses newClauses;
for (size_t j = 0; j < clauses.size(); j++) {
if (i != j) {
@ -557,36 +545,6 @@ LiftedCircuit::tryAtomCounting (
bool
LiftedCircuit::tryGrounding (
CircuitNode**,
Clauses&)
{
return false;
/*
size_t bestClauseIdx = 0;
size_t bestLogVarIdx = 0;
unsigned minNrSymbols = Util::maxUnsigned();
for (size_t i = 0; i < clauses.size(); i++) {
LogVarSet lvs = clauses[i].constr().logVars();
ConstraintTree ct = clauses[i].constr();
for (unsigned j = 0; j < lvs.size(); j++) {
unsigned nrSymbols = ct.nrSymbols (lvs[j]);
if (nrSymbols < minNrSymbols) {
minNrSymbols = nrSymbols;
bestClauseIdx = i;
bestLogVarIdx = j;
}
}
}
LogVar bestLogVar = clauses[bestClauseIdx].constr().logVars()[bestLogVarIdx];
ConstraintTrees cts = clauses[bestClauseIdx].constr().ground (bestLogVar);
return true;
*/
}
void
LiftedCircuit::shatterCountedLogVars (Clauses& clauses)
{

View File

@ -234,8 +234,6 @@ class LiftedCircuit
bool tryAtomCounting (CircuitNode** follow, Clauses& clauses);
bool tryGrounding (CircuitNode** follow, Clauses& clauses);
void shatterCountedLogVars (Clauses& clauses);
bool shatterCountedLogVarsAux (Clauses& clauses);