shatter agains the query in lifted knowledge compilation
This commit is contained in:
parent
4776817603
commit
f5c85ffcc9
@ -1,20 +1,22 @@
|
|||||||
#include "LiftedKc.h"
|
#include "LiftedKc.h"
|
||||||
#include "LiftedWCNF.h"
|
#include "LiftedWCNF.h"
|
||||||
#include "LiftedCircuit.h"
|
#include "LiftedCircuit.h"
|
||||||
|
#include "LiftedOperations.h"
|
||||||
#include "Indexer.h"
|
#include "Indexer.h"
|
||||||
|
|
||||||
|
|
||||||
LiftedKc::LiftedKc (const ParfactorList& pfList)
|
LiftedKc::LiftedKc (const ParfactorList& pfList)
|
||||||
: pfList_(pfList)
|
: pfList_(pfList)
|
||||||
{
|
{
|
||||||
lwcnf_ = new LiftedWCNF (pfList);
|
|
||||||
circuit_ = new LiftedCircuit (lwcnf_);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
LiftedKc::~LiftedKc (void)
|
LiftedKc::~LiftedKc (void)
|
||||||
{
|
{
|
||||||
|
delete lwcnf_;
|
||||||
|
delete circuit_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -22,6 +24,9 @@ LiftedKc::~LiftedKc (void)
|
|||||||
Params
|
Params
|
||||||
LiftedKc::solveQuery (const Grounds& query)
|
LiftedKc::solveQuery (const Grounds& query)
|
||||||
{
|
{
|
||||||
|
LiftedOperations::shatterAgainstQuery (pfList_, query);
|
||||||
|
lwcnf_ = new LiftedWCNF (pfList_);
|
||||||
|
circuit_ = new LiftedCircuit (lwcnf_);
|
||||||
vector<PrvGroup> groups;
|
vector<PrvGroup> groups;
|
||||||
Ranges ranges;
|
Ranges ranges;
|
||||||
for (size_t i = 0; i < query.size(); i++) {
|
for (size_t i = 0; i < query.size(); i++) {
|
||||||
@ -36,6 +41,7 @@ LiftedKc::solveQuery (const Grounds& query)
|
|||||||
++ it;
|
++ it;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
assert (groups.size() == query.size());
|
||||||
cout << "groups: " << groups << endl;
|
cout << "groups: " << groups << endl;
|
||||||
cout << "ranges: " << ranges << endl;
|
cout << "ranges: " << ranges << endl;
|
||||||
Params params;
|
Params params;
|
||||||
|
@ -21,7 +21,7 @@ class LiftedKc
|
|||||||
LiftedWCNF* lwcnf_;
|
LiftedWCNF* lwcnf_;
|
||||||
LiftedCircuit* circuit_;
|
LiftedCircuit* circuit_;
|
||||||
|
|
||||||
const ParfactorList& pfList_;
|
ParfactorList pfList_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // HORUS_LIFTEDKC_H
|
#endif // HORUS_LIFTEDKC_H
|
||||||
|
Reference in New Issue
Block a user