-
Notifications
You must be signed in to change notification settings - Fork 19
/
RcppExports.cpp
165 lines (159 loc) · 11.3 KB
/
RcppExports.cpp
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
// Generated by using Rcpp::compileAttributes() -> do not edit by hand
// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#include <RcppArmadillo.h>
#include <RcppGSL.h>
#include <Rcpp.h>
using namespace Rcpp;
#ifdef RCPP_USE_GLOBAL_ROSTREAM
Rcpp::Rostream<true>& Rcpp::Rcout = Rcpp::Rcpp_cout_get();
Rcpp::Rostream<false>& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get();
#endif
// extreme_deconvolution_rcpp
List extreme_deconvolution_rcpp(RcppGSL::matrix<double>& ydata, RcppGSL::vector<double>& ycovar, RcppGSL::vector<double>& projection, RcppGSL::vector<double>& logweights, RcppGSL::vector<double>& amp, RcppGSL::matrix<double>& xmean, RcppGSL::vector<double>& xcovar, RcppGSL::vector<int>& fixamp_int, RcppGSL::vector<int>& fixmean_int, RcppGSL::vector<int>& fixcovar_int, double tol, int maxiter, int likeonly, double w, RcppGSL::vector<int>& logfilename, int splitnmerge, RcppGSL::vector<int>& convlogfilename, bool noproj, bool diagerrs, bool noweight);
RcppExport SEXP _mashr_extreme_deconvolution_rcpp(SEXP ydataSEXP, SEXP ycovarSEXP, SEXP projectionSEXP, SEXP logweightsSEXP, SEXP ampSEXP, SEXP xmeanSEXP, SEXP xcovarSEXP, SEXP fixamp_intSEXP, SEXP fixmean_intSEXP, SEXP fixcovar_intSEXP, SEXP tolSEXP, SEXP maxiterSEXP, SEXP likeonlySEXP, SEXP wSEXP, SEXP logfilenameSEXP, SEXP splitnmergeSEXP, SEXP convlogfilenameSEXP, SEXP noprojSEXP, SEXP diagerrsSEXP, SEXP noweightSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< RcppGSL::matrix<double>& >::type ydata(ydataSEXP);
Rcpp::traits::input_parameter< RcppGSL::vector<double>& >::type ycovar(ycovarSEXP);
Rcpp::traits::input_parameter< RcppGSL::vector<double>& >::type projection(projectionSEXP);
Rcpp::traits::input_parameter< RcppGSL::vector<double>& >::type logweights(logweightsSEXP);
Rcpp::traits::input_parameter< RcppGSL::vector<double>& >::type amp(ampSEXP);
Rcpp::traits::input_parameter< RcppGSL::matrix<double>& >::type xmean(xmeanSEXP);
Rcpp::traits::input_parameter< RcppGSL::vector<double>& >::type xcovar(xcovarSEXP);
Rcpp::traits::input_parameter< RcppGSL::vector<int>& >::type fixamp_int(fixamp_intSEXP);
Rcpp::traits::input_parameter< RcppGSL::vector<int>& >::type fixmean_int(fixmean_intSEXP);
Rcpp::traits::input_parameter< RcppGSL::vector<int>& >::type fixcovar_int(fixcovar_intSEXP);
Rcpp::traits::input_parameter< double >::type tol(tolSEXP);
Rcpp::traits::input_parameter< int >::type maxiter(maxiterSEXP);
Rcpp::traits::input_parameter< int >::type likeonly(likeonlySEXP);
Rcpp::traits::input_parameter< double >::type w(wSEXP);
Rcpp::traits::input_parameter< RcppGSL::vector<int>& >::type logfilename(logfilenameSEXP);
Rcpp::traits::input_parameter< int >::type splitnmerge(splitnmergeSEXP);
Rcpp::traits::input_parameter< RcppGSL::vector<int>& >::type convlogfilename(convlogfilenameSEXP);
Rcpp::traits::input_parameter< bool >::type noproj(noprojSEXP);
Rcpp::traits::input_parameter< bool >::type diagerrs(diagerrsSEXP);
Rcpp::traits::input_parameter< bool >::type noweight(noweightSEXP);
rcpp_result_gen = Rcpp::wrap(extreme_deconvolution_rcpp(ydata, ycovar, projection, logweights, amp, xmean, xcovar, fixamp_int, fixmean_int, fixcovar_int, tol, maxiter, likeonly, w, logfilename, splitnmerge, convlogfilename, noproj, diagerrs, noweight));
return rcpp_result_gen;
END_RCPP
}
// inv_chol_tri_rcpp
List inv_chol_tri_rcpp(const arma::mat& x_mat);
RcppExport SEXP _mashr_inv_chol_tri_rcpp(SEXP x_matSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const arma::mat& >::type x_mat(x_matSEXP);
rcpp_result_gen = Rcpp::wrap(inv_chol_tri_rcpp(x_mat));
return rcpp_result_gen;
END_RCPP
}
// calc_lik_rcpp
List calc_lik_rcpp(const arma::mat& b_mat, const arma::mat& s_mat, const arma::mat& v_mat, const arma::mat& l_mat, NumericVector& U_3d, NumericVector& sigma_3d, bool logd, bool common_cov, int n_thread);
RcppExport SEXP _mashr_calc_lik_rcpp(SEXP b_matSEXP, SEXP s_matSEXP, SEXP v_matSEXP, SEXP l_matSEXP, SEXP U_3dSEXP, SEXP sigma_3dSEXP, SEXP logdSEXP, SEXP common_covSEXP, SEXP n_threadSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const arma::mat& >::type b_mat(b_matSEXP);
Rcpp::traits::input_parameter< const arma::mat& >::type s_mat(s_matSEXP);
Rcpp::traits::input_parameter< const arma::mat& >::type v_mat(v_matSEXP);
Rcpp::traits::input_parameter< const arma::mat& >::type l_mat(l_matSEXP);
Rcpp::traits::input_parameter< NumericVector& >::type U_3d(U_3dSEXP);
Rcpp::traits::input_parameter< NumericVector& >::type sigma_3d(sigma_3dSEXP);
Rcpp::traits::input_parameter< bool >::type logd(logdSEXP);
Rcpp::traits::input_parameter< bool >::type common_cov(common_covSEXP);
Rcpp::traits::input_parameter< int >::type n_thread(n_threadSEXP);
rcpp_result_gen = Rcpp::wrap(calc_lik_rcpp(b_mat, s_mat, v_mat, l_mat, U_3d, sigma_3d, logd, common_cov, n_thread));
return rcpp_result_gen;
END_RCPP
}
// calc_lik_precomputed_rcpp
List calc_lik_precomputed_rcpp(const arma::mat& b_mat, NumericVector& rooti_3d, bool logd, bool common_cov, int n_thread);
RcppExport SEXP _mashr_calc_lik_precomputed_rcpp(SEXP b_matSEXP, SEXP rooti_3dSEXP, SEXP logdSEXP, SEXP common_covSEXP, SEXP n_threadSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const arma::mat& >::type b_mat(b_matSEXP);
Rcpp::traits::input_parameter< NumericVector& >::type rooti_3d(rooti_3dSEXP);
Rcpp::traits::input_parameter< bool >::type logd(logdSEXP);
Rcpp::traits::input_parameter< bool >::type common_cov(common_covSEXP);
Rcpp::traits::input_parameter< int >::type n_thread(n_threadSEXP);
rcpp_result_gen = Rcpp::wrap(calc_lik_precomputed_rcpp(b_mat, rooti_3d, logd, common_cov, n_thread));
return rcpp_result_gen;
END_RCPP
}
// calc_post_rcpp
List calc_post_rcpp(const arma::mat& b_mat, const arma::mat& s_mat, const arma::mat& s_alpha_mat, const arma::mat& s_orig_mat, const arma::mat& v_mat, const arma::mat& l_mat, const arma::mat& a_mat, NumericVector& U_3d, const arma::mat& posterior_weights, bool common_cov, int report_type, int n_thread);
RcppExport SEXP _mashr_calc_post_rcpp(SEXP b_matSEXP, SEXP s_matSEXP, SEXP s_alpha_matSEXP, SEXP s_orig_matSEXP, SEXP v_matSEXP, SEXP l_matSEXP, SEXP a_matSEXP, SEXP U_3dSEXP, SEXP posterior_weightsSEXP, SEXP common_covSEXP, SEXP report_typeSEXP, SEXP n_threadSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const arma::mat& >::type b_mat(b_matSEXP);
Rcpp::traits::input_parameter< const arma::mat& >::type s_mat(s_matSEXP);
Rcpp::traits::input_parameter< const arma::mat& >::type s_alpha_mat(s_alpha_matSEXP);
Rcpp::traits::input_parameter< const arma::mat& >::type s_orig_mat(s_orig_matSEXP);
Rcpp::traits::input_parameter< const arma::mat& >::type v_mat(v_matSEXP);
Rcpp::traits::input_parameter< const arma::mat& >::type l_mat(l_matSEXP);
Rcpp::traits::input_parameter< const arma::mat& >::type a_mat(a_matSEXP);
Rcpp::traits::input_parameter< NumericVector& >::type U_3d(U_3dSEXP);
Rcpp::traits::input_parameter< const arma::mat& >::type posterior_weights(posterior_weightsSEXP);
Rcpp::traits::input_parameter< bool >::type common_cov(common_covSEXP);
Rcpp::traits::input_parameter< int >::type report_type(report_typeSEXP);
Rcpp::traits::input_parameter< int >::type n_thread(n_threadSEXP);
rcpp_result_gen = Rcpp::wrap(calc_post_rcpp(b_mat, s_mat, s_alpha_mat, s_orig_mat, v_mat, l_mat, a_mat, U_3d, posterior_weights, common_cov, report_type, n_thread));
return rcpp_result_gen;
END_RCPP
}
// calc_sermix_rcpp
List calc_sermix_rcpp(const arma::mat& b_mat, const arma::mat& s_mat, const arma::mat& v_mat, NumericVector& vinv_3d, NumericVector& U_3d, NumericVector& Uinv_3d, NumericVector& U0_3d, const arma::mat& posterior_mixture_weights, const arma::mat& posterior_variable_weights, bool common_cov, int n_thread);
RcppExport SEXP _mashr_calc_sermix_rcpp(SEXP b_matSEXP, SEXP s_matSEXP, SEXP v_matSEXP, SEXP vinv_3dSEXP, SEXP U_3dSEXP, SEXP Uinv_3dSEXP, SEXP U0_3dSEXP, SEXP posterior_mixture_weightsSEXP, SEXP posterior_variable_weightsSEXP, SEXP common_covSEXP, SEXP n_threadSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const arma::mat& >::type b_mat(b_matSEXP);
Rcpp::traits::input_parameter< const arma::mat& >::type s_mat(s_matSEXP);
Rcpp::traits::input_parameter< const arma::mat& >::type v_mat(v_matSEXP);
Rcpp::traits::input_parameter< NumericVector& >::type vinv_3d(vinv_3dSEXP);
Rcpp::traits::input_parameter< NumericVector& >::type U_3d(U_3dSEXP);
Rcpp::traits::input_parameter< NumericVector& >::type Uinv_3d(Uinv_3dSEXP);
Rcpp::traits::input_parameter< NumericVector& >::type U0_3d(U0_3dSEXP);
Rcpp::traits::input_parameter< const arma::mat& >::type posterior_mixture_weights(posterior_mixture_weightsSEXP);
Rcpp::traits::input_parameter< const arma::mat& >::type posterior_variable_weights(posterior_variable_weightsSEXP);
Rcpp::traits::input_parameter< bool >::type common_cov(common_covSEXP);
Rcpp::traits::input_parameter< int >::type n_thread(n_threadSEXP);
rcpp_result_gen = Rcpp::wrap(calc_sermix_rcpp(b_mat, s_mat, v_mat, vinv_3d, U_3d, Uinv_3d, U0_3d, posterior_mixture_weights, posterior_variable_weights, common_cov, n_thread));
return rcpp_result_gen;
END_RCPP
}
// fit_teem_rcpp
List fit_teem_rcpp(const arma::mat& x_mat, const arma::vec& w_vec, NumericVector& U_3d, int maxiter, double converge_tol, double eigen_tol, bool verbose);
RcppExport SEXP _mashr_fit_teem_rcpp(SEXP x_matSEXP, SEXP w_vecSEXP, SEXP U_3dSEXP, SEXP maxiterSEXP, SEXP converge_tolSEXP, SEXP eigen_tolSEXP, SEXP verboseSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const arma::mat& >::type x_mat(x_matSEXP);
Rcpp::traits::input_parameter< const arma::vec& >::type w_vec(w_vecSEXP);
Rcpp::traits::input_parameter< NumericVector& >::type U_3d(U_3dSEXP);
Rcpp::traits::input_parameter< int >::type maxiter(maxiterSEXP);
Rcpp::traits::input_parameter< double >::type converge_tol(converge_tolSEXP);
Rcpp::traits::input_parameter< double >::type eigen_tol(eigen_tolSEXP);
Rcpp::traits::input_parameter< bool >::type verbose(verboseSEXP);
rcpp_result_gen = Rcpp::wrap(fit_teem_rcpp(x_mat, w_vec, U_3d, maxiter, converge_tol, eigen_tol, verbose));
return rcpp_result_gen;
END_RCPP
}
static const R_CallMethodDef CallEntries[] = {
{"_mashr_extreme_deconvolution_rcpp", (DL_FUNC) &_mashr_extreme_deconvolution_rcpp, 20},
{"_mashr_inv_chol_tri_rcpp", (DL_FUNC) &_mashr_inv_chol_tri_rcpp, 1},
{"_mashr_calc_lik_rcpp", (DL_FUNC) &_mashr_calc_lik_rcpp, 9},
{"_mashr_calc_lik_precomputed_rcpp", (DL_FUNC) &_mashr_calc_lik_precomputed_rcpp, 5},
{"_mashr_calc_post_rcpp", (DL_FUNC) &_mashr_calc_post_rcpp, 12},
{"_mashr_calc_sermix_rcpp", (DL_FUNC) &_mashr_calc_sermix_rcpp, 11},
{"_mashr_fit_teem_rcpp", (DL_FUNC) &_mashr_fit_teem_rcpp, 7},
{NULL, NULL, 0}
};
RcppExport void R_init_mashr(DllInfo *dll) {
R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
R_useDynamicSymbols(dll, FALSE);
}