-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.hpp
79 lines (55 loc) · 1.56 KB
/
template.hpp
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#ifndef template_hpp
#define template_hpp
#define ARMA_DONT_PRINT_ERRORS
// [[Rcpp::depends(RcppArmadillo)]]
#include "include/Adaptive_Gibbs.hpp"
using namespace Rcpp;
using namespace arma;
using namespace std;
//FEEL FREE TO USE BUT DO NOT CHANGE THE GLOBAL VARIABLES IN THIS FILE (THE GLOBAL VARIABLES ARE LISTED IN Adaptive_Gibbs.hpp)
class new_density: public distribution_class{
public:
//add some additional functions/parameters if necessary
new_density();//specify constructor if necessary
~new_density(); //specify destructor if necessary
double density(vec theta); //target density at the point theta
double logdensity(vec theta); //logarithm of the target density
double full_cond(vec theta, int gp); //full conditional of the block gp
double logfull_cond(vec theta, int gp); //logarithm of the full conditional of the block gp
vec sample_full_cond(vec theta, int gp); //sample block gp from its full conditional distributiont
};
new_density::new_density()
{
}
new_density::~new_density()
{
}
double new_density::density(vec theta)
{
return 0;
}
double new_density::logdensity(vec theta)
{
return 0;
}
double new_density::full_cond(vec theta, int gp)
{
return 0;
}
double new_density::logfull_cond(vec theta, int gp)
{
return 0;
}
//should return a vector of the same dimension as the block gp
vec new_density::sample_full_cond(vec theta, int gp)
{
vec res;
return res;
}
//Precompiled C++ functions for use in R
// [[Rcpp::export]]
double some_function()
{
return 0;
}
#endif /* template_hpp */