Skip to content

Commit 451e720

Browse files
committed
corrected C++ function exports
1 parent 9728e81 commit 451e720

File tree

8 files changed

+801
-121
lines changed

8 files changed

+801
-121
lines changed

R/RcppExports.R

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -9,62 +9,6 @@ bvarPANEL <- function(S, Y, X, prior, starting_values, thin, show_progress, adpt
99
.Call(`_bvarPANELs_bvarPANEL`, S, Y, X, prior, starting_values, thin, show_progress, adptive_alpha_gamma)
1010
}
1111

12-
Sigma2B_c <- function(posterior_Sigma_c, lower = TRUE) {
13-
.Call(`_bvarPANELs_Sigma2B_c`, posterior_Sigma_c, lower)
14-
}
15-
16-
panel_variance_decompositions <- function(posterior_Sigma, posterior_A, global_Sigma, global_A, horizon, p, lower = TRUE) {
17-
.Call(`_bvarPANELs_panel_variance_decompositions`, posterior_Sigma, posterior_A, global_Sigma, global_A, horizon, p, lower)
18-
}
19-
20-
rmniw1 <- function(A, V, S, nu) {
21-
.Call(`_bvarPANELs_rmniw1`, A, V, S, nu)
22-
}
23-
24-
sample_m <- function(aux_A, aux_V, aux_s, aux_w, prior) {
25-
.Call(`_bvarPANELs_sample_m`, aux_A, aux_V, aux_s, aux_w, prior)
26-
}
27-
28-
sample_w <- function(aux_V, prior) {
29-
.Call(`_bvarPANELs_sample_w`, aux_V, prior)
30-
}
31-
32-
sample_s <- function(aux_A, aux_V, aux_Sigma, aux_m, prior) {
33-
.Call(`_bvarPANELs_sample_s`, aux_A, aux_V, aux_Sigma, aux_m, prior)
34-
}
35-
36-
log_kernel_nu <- function(aux_nu, aux_Sigma_c_cpp, aux_Sigma_c_inv, aux_Sigma, prior_lambda, C, N, K) {
37-
.Call(`_bvarPANELs_log_kernel_nu`, aux_nu, aux_Sigma_c_cpp, aux_Sigma_c_inv, aux_Sigma, prior_lambda, C, N, K)
38-
}
39-
40-
cov_nu <- function(aux_nu, C, N) {
41-
.Call(`_bvarPANELs_cov_nu`, aux_nu, C, N)
42-
}
43-
44-
sample_nu <- function(aux_nu, adaptive_scale, aux_Sigma_c_cpp, aux_Sigma_c_inv, aux_Sigma, prior, iteration, adptive_alpha_gamma) {
45-
.Call(`_bvarPANELs_sample_nu`, aux_nu, adaptive_scale, aux_Sigma_c_cpp, aux_Sigma_c_inv, aux_Sigma, prior, iteration, adptive_alpha_gamma)
46-
}
47-
48-
sample_Sigma <- function(aux_Sigma_c_inv, aux_s, aux_nu, prior) {
49-
.Call(`_bvarPANELs_sample_Sigma`, aux_Sigma_c_inv, aux_s, aux_nu, prior)
50-
}
51-
52-
sample_AV <- function(aux_A_c_cpp, aux_Sigma_c_inv, aux_s, aux_m, aux_w, prior) {
53-
.Call(`_bvarPANELs_sample_AV`, aux_A_c_cpp, aux_Sigma_c_inv, aux_s, aux_m, aux_w, prior)
54-
}
55-
56-
sample_A_c_Sigma_c <- function(Y_c, X_c, aux_A, aux_V, aux_Sigma, aux_nu) {
57-
.Call(`_bvarPANELs_sample_A_c_Sigma_c`, Y_c, X_c, aux_A, aux_V, aux_Sigma, aux_nu)
58-
}
59-
60-
log_kernel_ga <- function(YG, XG, A_g, Sigma_g, aux_A, aux_V_inv, aux_Sigma, aux_Sigma_inv, aux_nu) {
61-
.Call(`_bvarPANELs_log_kernel_ga`, YG, XG, A_g, Sigma_g, aux_A, aux_V_inv, aux_Sigma, aux_Sigma_inv, aux_nu)
62-
}
63-
64-
sample_group_allocation <- function(aux_ga, yt, xt, aux_A_g, aux_Sigma_g, aux_A, aux_V_inv, aux_Sigma, aux_Sigma_inv, aux_nu) {
65-
.Call(`_bvarPANELs_sample_group_allocation`, aux_ga, yt, xt, aux_A_g, aux_Sigma_g, aux_A, aux_V_inv, aux_Sigma, aux_Sigma_inv, aux_nu)
66-
}
67-
6812
# Register entry points for exported C++ functions
6913
methods::setLoadAction(function(ns) {
7014
.Call(`_bvarPANELs_RcppExport_registerCCallable`)

inst/include/bvarPANELs_RcppExports.h

Lines changed: 336 additions & 0 deletions
Large diffs are not rendered by default.

src/RcppExports.cpp

Lines changed: 448 additions & 48 deletions
Large diffs are not rendered by default.

src/bvarGroupPANEL.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ using namespace Rcpp;
99
using namespace arma;
1010

1111

12-
// [[Rcpp:interface(cpp,r)]]
12+
// [[Rcpp::interfaces(cpp,r)]]
1313
// [[Rcpp::export]]
1414
Rcpp::List bvarGroupPANEL(
1515
const int& S, // No. of posterior draws

src/bvarPANEL.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ using namespace Rcpp;
88
using namespace arma;
99

1010

11-
// [[Rcpp:interface(cpp,r)]]
11+
// [[Rcpp::interfaces(cpp,r)]]
1212
// [[Rcpp::export]]
1313
Rcpp::List bvarPANEL(
1414
const int& S, // No. of posterior draws

src/panel_variance_decompositions.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
using namespace Rcpp;
66
using namespace arma;
77

8-
9-
// [[Rcpp:interface(cpp,r)]]
8+
// [[Rcpp::interfaces(cpp)]]
109
// [[Rcpp::export]]
1110
arma::cube Sigma2B_c (
1211
arma::cube& posterior_Sigma_c, // (N, N, S)
@@ -49,7 +48,7 @@ arma::cube flip_cube_rows_cols (
4948

5049

5150

52-
// [[Rcpp:interface(cpp,r)]]
51+
// [[Rcpp::interfaces(cpp,r)]]
5352
// [[Rcpp::export]]
5453
arma::field<arma::cube> panel_variance_decompositions (
5554
arma::field<arma::cube>& posterior_Sigma, // (S)(N, N, C)

src/sample_mniw.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ using namespace Rcpp;
77
using namespace arma;
88

99

10-
// [[Rcpp:interface(cpp,r)]]
10+
// [[Rcpp::interfaces(cpp)]]
1111
// [[Rcpp::export]]
1212
arma::field<arma::mat> rmniw1(
1313
const arma::mat& A, // KxN
@@ -32,7 +32,7 @@ arma::field<arma::mat> rmniw1(
3232
} // END rmniw1
3333

3434

35-
// [[Rcpp:interface(cpp)]]
35+
// [[Rcpp::interfaces(cpp)]]
3636
// [[Rcpp::export]]
3737
double sample_m (
3838
const arma::mat& aux_A, // KxN
@@ -62,7 +62,7 @@ double sample_m (
6262
} // END sample_m
6363

6464

65-
// [[Rcpp:interface(cpp)]]
65+
// [[Rcpp::interfaces(cpp)]]
6666
// [[Rcpp::export]]
6767
double sample_w (
6868
const arma::mat& aux_V, // KxK
@@ -84,7 +84,7 @@ double sample_w (
8484
} // END sample_w
8585

8686

87-
// [[Rcpp:interface(cpp)]]
87+
// [[Rcpp::interfaces(cpp)]]
8888
// [[Rcpp::export]]
8989
double sample_s (
9090
const arma::mat& aux_A, // KxN
@@ -114,7 +114,7 @@ double sample_s (
114114

115115

116116

117-
// [[Rcpp:interface(cpp)]]
117+
// [[Rcpp::interfaces(cpp)]]
118118
// [[Rcpp::export]]
119119
double log_kernel_nu (
120120
const double& aux_nu, // scalar
@@ -155,7 +155,7 @@ double log_kernel_nu (
155155

156156

157157

158-
// [[Rcpp:interface(cpp)]]
158+
// [[Rcpp::interfaces(cpp)]]
159159
// [[Rcpp::export]]
160160
double cov_nu (
161161
const double& aux_nu,
@@ -176,7 +176,7 @@ double cov_nu (
176176

177177

178178

179-
// [[Rcpp:interface(cpp)]]
179+
// [[Rcpp::interfaces(cpp)]]
180180
// [[Rcpp::export]]
181181
arma::vec sample_nu (
182182
double& aux_nu, // scalar
@@ -280,7 +280,7 @@ arma::vec sample_nu (
280280

281281

282282

283-
// [[Rcpp:interface(cpp)]]
283+
// [[Rcpp::interfaces(cpp)]]
284284
// [[Rcpp::export]]
285285
arma::mat sample_Sigma (
286286
const arma::cube& aux_Sigma_c_inv, // NxNxC
@@ -308,7 +308,7 @@ arma::mat sample_Sigma (
308308
} // END sample_Sigma
309309

310310

311-
// [[Rcpp:interface(cpp)]]
311+
// [[Rcpp::interfaces(cpp)]]
312312
// [[Rcpp::export]]
313313
arma::field<arma::mat> sample_AV (
314314
const arma::cube& aux_A_c_cpp, // KxNxC
@@ -351,7 +351,7 @@ arma::field<arma::mat> sample_AV (
351351
} // END sample_AV
352352

353353

354-
// [[Rcpp:interface(cpp)]]
354+
// [[Rcpp::interfaces(cpp)]]
355355
// [[Rcpp::export]]
356356
arma::field<arma::mat> sample_A_c_Sigma_c (
357357
const arma::mat& Y_c, // T_cxN
@@ -378,7 +378,7 @@ arma::field<arma::mat> sample_A_c_Sigma_c (
378378
} // END sample_A_c_Sigma_c
379379

380380

381-
// [[Rcpp:interface(cpp)]]
381+
// [[Rcpp::interfaces(cpp)]]
382382
// [[Rcpp::export]]
383383
double log_kernel_ga (
384384
const arma::mat& YG, // (C_g*T, N) - only group-specific
@@ -415,7 +415,7 @@ double log_kernel_ga (
415415
} // END log_kernel_ga
416416

417417

418-
// [[Rcpp:interface(cpp)]]
418+
// [[Rcpp::interfaces(cpp)]]
419419
// [[Rcpp::export]]
420420
arma::vec sample_group_allocation (
421421
arma::vec& aux_ga, // (C, 1)

src/utils.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using namespace Rcpp;
55
using namespace arma;
66

7+
// [[Rcpp::interfaces(cpp)]]
78
// [[Rcpp::export]]
89
arma::mat tcube_to_mat_by_slices (
910
arma::cube Y // TRANSPOSED cube (T,N,C_g) - not (N,T,C_g) - to use reshape

0 commit comments

Comments
 (0)