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/clpbn/bp/Solver.h

37 lines
641 B
C
Raw Normal View History

2011-12-12 15:29:51 +00:00
#ifndef HORUS_SOLVER_H
#define HORUS_SOLVER_H
#include <iomanip>
2012-04-05 23:00:48 +01:00
#include "Var.h"
#include "FactorGraph.h"
using namespace std;
class Solver
{
public:
2012-04-05 23:00:48 +01:00
Solver (const FactorGraph& fg) : fg_(fg) { }
2012-03-31 23:27:37 +01:00
virtual ~Solver() { } // ensure that subclass destructor is called
virtual void runSolver (void) = 0;
virtual Params getPosterioriOf (VarId) = 0;
virtual Params getJointDistributionOf (const VarIds&) = 0;
2011-12-12 15:29:51 +00:00
void printAllPosterioris (void);
2012-03-31 23:27:37 +01:00
2011-12-12 15:29:51 +00:00
void printPosterioriOf (VarId vid);
2012-03-31 23:27:37 +01:00
2012-03-22 11:33:24 +00:00
void printJointDistributionOf (const VarIds& vids);
2011-12-12 15:29:51 +00:00
private:
2012-04-05 23:00:48 +01:00
const FactorGraph& fg_;
};
2011-12-12 15:29:51 +00:00
#endif // HORUS_SOLVER_H