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

87 lines
1.5 KiB
C
Raw Normal View History

2012-05-23 14:56:01 +01:00
#ifndef HORUS_HORUS_H
#define HORUS_HORUS_H
#include <limits>
#include <vector>
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
TypeName(const TypeName&); \
void operator=(const TypeName&)
using namespace std;
class Var;
class Factor;
class VarNode;
class FacNode;
typedef vector<double> Params;
typedef unsigned VarId;
typedef vector<VarId> VarIds;
typedef vector<Var*> Vars;
typedef vector<VarNode*> VarNodes;
typedef vector<FacNode*> FacNodes;
typedef vector<Factor*> Factors;
typedef vector<string> States;
typedef vector<unsigned> Ranges;
typedef unsigned long long ullong;
2012-06-12 21:27:17 +01:00
enum LiftedSolver
2012-05-23 14:56:01 +01:00
{
FOVE, // first order variable elimination
LBP, // lifted belief propagation
};
2012-06-12 21:27:17 +01:00
enum GroundSolver
{
VE, // variable elimination
BP, // belief propagation
CBP // counting belief propagation
2012-05-23 14:56:01 +01:00
};
namespace Globals {
extern bool logDomain;
// level of debug information
extern unsigned verbosity;
2012-06-12 21:27:17 +01:00
extern LiftedSolver liftedSolver;
extern GroundSolver groundSolver;
2012-05-23 14:56:01 +01:00
};
namespace Constants {
// show message calculation for belief propagation
const bool SHOW_BP_CALCS = false;
const int NO_EVIDENCE = -1;
// number of digits to show when printing a parameter
const unsigned PRECISION = 6;
};
namespace BpOptions
{
enum Schedule {
SEQ_FIXED,
SEQ_RANDOM,
PARALLEL,
MAX_RESIDUAL
};
extern Schedule schedule;
extern double accuracy;
extern unsigned maxIter;
}
#endif // HORUS_HORUS_H