📄 pottsmrf.h
字号:
#include "MRF.h"#ifndef __POTTS_MODEL_MARKOV_RANDOM_FIELD__#define __POTTS_MODEL_MARKOV_RANDOM_FIELD__class PottsMRF : public MRF { /** This class holds all the data defining the Markov Random Field for Potts Model (holding only lambda_ij, where pairPotential(i,j) = exp(-lambda_ij) for xi=xj, and exp(+lambda_ij) for xi!=xj Part of the c_inference package @version November 2004 @author Talya Meltzer */ public: PottsMRF(vector<Nodes>& adj) : MRF(adj) { lambdaValues = 0; } virtual ~PottsMRF(); virtual double pairPotential (int i, int n, int xi, int xj) const; virtual double pairEnergy (int i, int n, int xi, int xj) const; void initLambdaValues(); virtual void setTemperature(double sT); virtual double getEnergy(int const* assignment) const; virtual bool isPairwise() const { return lambdaValues != 0; } double** lambdaValues; // defines the potentials between // 2 neighbouring variables }; //PottsMRF;#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -