[e23e50]: src / modules / bugs / samplers / MNormal.h Maximize Restore History

Download this file

MNormal.h    38 lines (30 with data), 810 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef MNORM_METROPOLIS_H_
#define MNORM_METROPOLIS_H_
#include <sampler/Metropolis.h>
namespace jags {
class SingletonGraphView;
namespace bugs {
class MNormMetropolis : public Metropolis
{
SingletonGraphView const *_gv;
unsigned int _chain;
double *_mean;
double *_var;
double *_prec;
unsigned int _n;
unsigned int _n_isotonic;
double _sump, _meanp;
double _lstep;
unsigned int _nstep;
unsigned int _p_over_target;
public:
MNormMetropolis(SingletonGraphView const *gv, unsigned int chain);
~MNormMetropolis();
void rescale(double p);
void update(RNG *rng);
bool checkAdaptation() const;
void getValue(std::vector<double> &value) const;
void setValue(std::vector<double> const &value);
};
}}
#endif /* MNORM_METROPOLIS_H_ */