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

33 lines
560 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-10 20:43:08 +01:00
Solver (const FactorGraph& factorGraph) : fg(factorGraph) { }
2012-03-31 23:27:37 +01:00
virtual ~Solver() { } // ensure that subclass destructor is called
2012-04-10 15:00:18 +01:00
virtual Params solveQuery (VarIds queryVids) = 0;
2012-03-31 23:27:37 +01:00
virtual void printSolverFlags (void) const = 0;
2012-04-10 15:00:18 +01:00
void printAnswer (const VarIds& vids);
2011-12-12 15:29:51 +00:00
void printAllPosterioris (void);
2012-04-10 15:00:18 +01:00
protected:
2012-04-10 20:43:08 +01:00
const FactorGraph& fg;
};
2011-12-12 15:29:51 +00:00
#endif // HORUS_SOLVER_H