shatter agains the query in lifted knowledge compilation

This commit is contained in:
Tiago Gomes 2012-11-12 15:20:42 +00:00
parent 4776817603
commit f5c85ffcc9
2 changed files with 9 additions and 3 deletions

View File

@ -1,20 +1,22 @@
#include "LiftedKc.h"
#include "LiftedWCNF.h"
#include "LiftedCircuit.h"
#include "LiftedOperations.h"
#include "Indexer.h"
LiftedKc::LiftedKc (const ParfactorList& pfList)
: pfList_(pfList)
{
lwcnf_ = new LiftedWCNF (pfList);
circuit_ = new LiftedCircuit (lwcnf_);
}
LiftedKc::~LiftedKc (void)
{
delete lwcnf_;
delete circuit_;
}
@ -22,6 +24,9 @@ LiftedKc::~LiftedKc (void)
Params
LiftedKc::solveQuery (const Grounds& query)
{
LiftedOperations::shatterAgainstQuery (pfList_, query);
lwcnf_ = new LiftedWCNF (pfList_);
circuit_ = new LiftedCircuit (lwcnf_);
vector<PrvGroup> groups;
Ranges ranges;
for (size_t i = 0; i < query.size(); i++) {
@ -36,6 +41,7 @@ LiftedKc::solveQuery (const Grounds& query)
++ it;
}
}
assert (groups.size() == query.size());
cout << "groups: " << groups << endl;
cout << "ranges: " << ranges << endl;
Params params;

View File

@ -21,7 +21,7 @@ class LiftedKc
LiftedWCNF* lwcnf_;
LiftedCircuit* circuit_;
const ParfactorList& pfList_;
ParfactorList pfList_;
};
#endif // HORUS_LIFTEDKC_H