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/VarElim.h

46 lines
785 B
C
Raw Normal View History

#ifndef HORUS_VARELIM_H
#define HORUS_VARELIM_H
2012-05-23 14:56:01 +01:00
#include "unordered_map"
2012-11-14 21:55:51 +00:00
#include "GroundSolver.h"
2012-05-23 14:56:01 +01:00
#include "FactorGraph.h"
#include "Horus.h"
using namespace std;
2012-11-14 21:55:51 +00:00
class VarElim : public GroundSolver
2012-05-23 14:56:01 +01:00
{
public:
2012-11-14 21:55:51 +00:00
VarElim (const FactorGraph& fg) : GroundSolver (fg) { }
2012-05-23 14:56:01 +01:00
2012-12-26 22:55:48 +00:00
~VarElim (void) { }
2012-05-23 14:56:01 +01:00
Params solveQuery (VarIds);
void printSolverFlags (void) const;
private:
void createFactorList (void);
void absorveEvidence (void);
2012-12-26 22:55:48 +00:00
Params processFactorList (const VarIds&);
2012-05-23 14:56:01 +01:00
void eliminate (VarId);
void printActiveFactors (void);
2012-12-26 22:55:48 +00:00
Factors factorList_;
unsigned largestFactorSize_;
unsigned totalFactorSize_;
unordered_map<VarId, vector<size_t>> varMap_;
2012-12-27 22:25:45 +00:00
DISALLOW_COPY_AND_ASSIGN (VarElim);
2012-05-23 14:56:01 +01:00
};
#endif // HORUS_VARELIM_H
2012-05-23 14:56:01 +01:00