[e23e50]: src / modules / glm / samplers / AMMethod.cc Maximize Restore History

Download this file

AMMethod.cc    39 lines (29 with data), 864 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
38
#include <config.h>
#include "AMMethod.h"
#include "Outcome.h"
using std::vector;
using std::string;
namespace jags {
namespace glm {
AMMethod::AMMethod(GraphView const *view,
vector<SingletonGraphView const *> const &sub_views,
vector<Outcome *> const &outcomes,
unsigned int chain)
: GLMMethod(view, sub_views, outcomes, chain, true)
{}
void AMMethod::update(RNG *rng)
{
/*
Note that we must update the auxiliary variables *before*
calling updateLM. This ordering is important for models with
a variable design matrix (e.g. measurement error models).
*/
for (vector<Outcome*>::const_iterator p = _outcomes.begin();
p != _outcomes.end(); ++p)
{
(*p)->update(rng);
}
//FIXME: Why not allow Gibbs sampling?
updateLM(rng);
}
}}