This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/packages/CLPBN/horus/LiftedBp.h

52 lines
961 B
C
Raw Normal View History

2013-02-07 17:50:02 +00:00
#ifndef YAP_PACKAGES_CLPBN_HORUS_LIFTEDBP_H_
#define YAP_PACKAGES_CLPBN_HORUS_LIFTEDBP_H_
2012-05-30 19:23:41 +01:00
2013-02-07 20:09:10 +00:00
#include <vector>
2012-11-14 21:55:51 +00:00
#include "LiftedSolver.h"
2012-05-30 19:23:41 +01:00
#include "ParfactorList.h"
#include "Indexer.h"
2012-05-30 19:23:41 +01:00
2013-02-07 13:37:15 +00:00
namespace Horus {
2013-02-07 23:53:13 +00:00
class FactorGraph;
class WeightedBp;
class LiftedBp : public LiftedSolver{
2012-05-30 19:23:41 +01:00
public:
LiftedBp (const ParfactorList& pfList);
2012-05-30 19:23:41 +01:00
~LiftedBp();
2012-06-13 12:17:49 +01:00
Params solveQuery (const Grounds&);
2012-05-30 19:23:41 +01:00
void printSolverFlags() const;
2012-05-30 19:23:41 +01:00
private:
void refineParfactors();
bool iterate();
2013-02-07 13:37:15 +00:00
std::vector<PrvGroup> getQueryGroups (const Grounds&);
void createFactorGraph();
std::vector<std::vector<unsigned>> getWeights() const;
2012-12-17 18:39:42 +00:00
2012-06-14 11:57:00 +01:00
unsigned rangeOfGround (const Ground&);
2012-06-14 11:57:00 +01:00
Params getJointByConditioning (const ParfactorList&, const Grounds&);
ParfactorList pfList_;
WeightedBp* solver_;
2012-09-11 18:40:41 +01:00
FactorGraph* fg_;
2012-05-30 19:23:41 +01:00
2012-12-27 22:25:45 +00:00
DISALLOW_COPY_AND_ASSIGN (LiftedBp);
2012-05-30 19:23:41 +01:00
};
} // namespace Horus
2013-02-07 23:53:13 +00:00
2013-02-08 00:20:01 +00:00
#endif // YAP_PACKAGES_CLPBN_HORUS_LIFTEDBP_H_