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

48 lines
924 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"
2013-02-07 13:37:15 +00:00
class FactorGraph;
class WeightedBp;
2012-11-14 21:55:51 +00:00
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
2012-06-13 12:17:49 +01:00
~LiftedBp (void);
2012-05-31 23:06:53 +01:00
Params solveQuery (const Grounds&);
2012-05-30 19:23:41 +01:00
void printSolverFlags (void) const;
private:
void refineParfactors (void);
bool iterate (void);
2013-02-07 13:37:15 +00:00
std::vector<PrvGroup> getQueryGroups (const Grounds&);
2012-09-11 18:40:41 +01:00
void createFactorGraph (void);
2013-02-07 13:37:15 +00:00
std::vector<std::vector<unsigned>> getWeights (void) 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
};
2013-02-07 17:50:02 +00:00
#endif // YAP_PACKAGES_CLPBN_HORUS_LIFTEDBP_H_