902624f557
"In fact, the f(void) style has been called an "abomination" by Bjarne Stroustrup, the creator of C++, Dennis Ritchie, the co-creator of C, and Doug McIlroy, head of the research department where Unix was born."
51 lines
940 B
C++
51 lines
940 B
C++
#ifndef YAP_PACKAGES_CLPBN_HORUS_LIFTEDBP_H_
|
|
#define YAP_PACKAGES_CLPBN_HORUS_LIFTEDBP_H_
|
|
|
|
#include <vector>
|
|
|
|
#include "LiftedSolver.h"
|
|
#include "ParfactorList.h"
|
|
|
|
|
|
namespace Horus {
|
|
|
|
class FactorGraph;
|
|
class WeightedBp;
|
|
|
|
class LiftedBp : public LiftedSolver{
|
|
public:
|
|
LiftedBp (const ParfactorList& pfList);
|
|
|
|
~LiftedBp();
|
|
|
|
Params solveQuery (const Grounds&);
|
|
|
|
void printSolverFlags() const;
|
|
|
|
private:
|
|
void refineParfactors();
|
|
|
|
bool iterate();
|
|
|
|
std::vector<PrvGroup> getQueryGroups (const Grounds&);
|
|
|
|
void createFactorGraph();
|
|
|
|
std::vector<std::vector<unsigned>> getWeights() const;
|
|
|
|
unsigned rangeOfGround (const Ground&);
|
|
|
|
Params getJointByConditioning (const ParfactorList&, const Grounds&);
|
|
|
|
ParfactorList pfList_;
|
|
WeightedBp* solver_;
|
|
FactorGraph* fg_;
|
|
|
|
DISALLOW_COPY_AND_ASSIGN (LiftedBp);
|
|
};
|
|
|
|
} // namespace Horus
|
|
|
|
#endif // YAP_PACKAGES_CLPBN_HORUS_LIFTEDBP_H_
|
|
|