Thanks to visit codestin.com
Credit goes to code.bioconductor.org

Browse code

add files for bioc submission

Zhi Yang authored on 01/10/2021 21:27:37
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,236 @@
1
+// Generated by using Rcpp::compileAttributes() -> do not edit by hand
2
+// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
3
+
4
+#include <RcppArmadillo.h>
5
+#include <Rcpp.h>
6
+
7
+using namespace Rcpp;
8
+
9
+#ifdef RCPP_USE_GLOBAL_ROSTREAM
10
+Rcpp::Rostream<true>&  Rcpp::Rcout = Rcpp::Rcpp_cout_get();
11
+Rcpp::Rostream<false>& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get();
12
+#endif
13
+
14
+// NBthDE_paraOptfeat
15
+List NBthDE_paraOptfeat(arma::mat& X, arma::vec y, arma::vec alpha0, arma::vec alpha, arma::mat& preci1, double threshold0, double preci2, arma::vec& x0, bool calhes);
16
+RcppExport SEXP _GeoDiff_NBthDE_paraOptfeat(SEXP XSEXP, SEXP ySEXP, SEXP alpha0SEXP, SEXP alphaSEXP, SEXP preci1SEXP, SEXP threshold0SEXP, SEXP preci2SEXP, SEXP x0SEXP, SEXP calhesSEXP) {
17
+BEGIN_RCPP
18
+    Rcpp::RObject rcpp_result_gen;
19
+    Rcpp::RNGScope rcpp_rngScope_gen;
20
+    Rcpp::traits::input_parameter< arma::mat& >::type X(XSEXP);
21
+    Rcpp::traits::input_parameter< arma::vec >::type y(ySEXP);
22
+    Rcpp::traits::input_parameter< arma::vec >::type alpha0(alpha0SEXP);
23
+    Rcpp::traits::input_parameter< arma::vec >::type alpha(alphaSEXP);
24
+    Rcpp::traits::input_parameter< arma::mat& >::type preci1(preci1SEXP);
25
+    Rcpp::traits::input_parameter< double >::type threshold0(threshold0SEXP);
26
+    Rcpp::traits::input_parameter< double >::type preci2(preci2SEXP);
27
+    Rcpp::traits::input_parameter< arma::vec& >::type x0(x0SEXP);
28
+    Rcpp::traits::input_parameter< bool >::type calhes(calhesSEXP);
29
+    rcpp_result_gen = Rcpp::wrap(NBthDE_paraOptfeat(X, y, alpha0, alpha, preci1, threshold0, preci2, x0, calhes));
30
+    return rcpp_result_gen;
31
+END_RCPP
32
+}
33
+// NBthDE_paraOptall
34
+List NBthDE_paraOptall(arma::mat& Y, arma::mat& X, arma::vec& alpha0, arma::vec& alpha, arma::mat& preci1, arma::vec& threshold0, double preci2, arma::vec& x0, bool sizescale, bool calhes);
35
+RcppExport SEXP _GeoDiff_NBthDE_paraOptall(SEXP YSEXP, SEXP XSEXP, SEXP alpha0SEXP, SEXP alphaSEXP, SEXP preci1SEXP, SEXP threshold0SEXP, SEXP preci2SEXP, SEXP x0SEXP, SEXP sizescaleSEXP, SEXP calhesSEXP) {
36
+BEGIN_RCPP
37
+    Rcpp::RObject rcpp_result_gen;
38
+    Rcpp::RNGScope rcpp_rngScope_gen;
39
+    Rcpp::traits::input_parameter< arma::mat& >::type Y(YSEXP);
40
+    Rcpp::traits::input_parameter< arma::mat& >::type X(XSEXP);
41
+    Rcpp::traits::input_parameter< arma::vec& >::type alpha0(alpha0SEXP);
42
+    Rcpp::traits::input_parameter< arma::vec& >::type alpha(alphaSEXP);
43
+    Rcpp::traits::input_parameter< arma::mat& >::type preci1(preci1SEXP);
44
+    Rcpp::traits::input_parameter< arma::vec& >::type threshold0(threshold0SEXP);
45
+    Rcpp::traits::input_parameter< double >::type preci2(preci2SEXP);
46
+    Rcpp::traits::input_parameter< arma::vec& >::type x0(x0SEXP);
47
+    Rcpp::traits::input_parameter< bool >::type sizescale(sizescaleSEXP);
48
+    Rcpp::traits::input_parameter< bool >::type calhes(calhesSEXP);
49
+    rcpp_result_gen = Rcpp::wrap(NBthDE_paraOptall(Y, X, alpha0, alpha, preci1, threshold0, preci2, x0, sizescale, calhes));
50
+    return rcpp_result_gen;
51
+END_RCPP
52
+}
53
+// NBthmDE_grad
54
+arma::vec NBthmDE_grad(arma::vec& y, arma::mat& X, arma::mat& Z, arma::vec& x, arma::vec& u, arma::vec& alpha0, arma::vec& alpha, arma::mat& preci1, double preci2, double threshold0);
55
+RcppExport SEXP _GeoDiff_NBthmDE_grad(SEXP ySEXP, SEXP XSEXP, SEXP ZSEXP, SEXP xSEXP, SEXP uSEXP, SEXP alpha0SEXP, SEXP alphaSEXP, SEXP preci1SEXP, SEXP preci2SEXP, SEXP threshold0SEXP) {
56
+BEGIN_RCPP
57
+    Rcpp::RObject rcpp_result_gen;
58
+    Rcpp::RNGScope rcpp_rngScope_gen;
59
+    Rcpp::traits::input_parameter< arma::vec& >::type y(ySEXP);
60
+    Rcpp::traits::input_parameter< arma::mat& >::type X(XSEXP);
61
+    Rcpp::traits::input_parameter< arma::mat& >::type Z(ZSEXP);
62
+    Rcpp::traits::input_parameter< arma::vec& >::type x(xSEXP);
63
+    Rcpp::traits::input_parameter< arma::vec& >::type u(uSEXP);
64
+    Rcpp::traits::input_parameter< arma::vec& >::type alpha0(alpha0SEXP);
65
+    Rcpp::traits::input_parameter< arma::vec& >::type alpha(alphaSEXP);
66
+    Rcpp::traits::input_parameter< arma::mat& >::type preci1(preci1SEXP);
67
+    Rcpp::traits::input_parameter< double >::type preci2(preci2SEXP);
68
+    Rcpp::traits::input_parameter< double >::type threshold0(threshold0SEXP);
69
+    rcpp_result_gen = Rcpp::wrap(NBthmDE_grad(y, X, Z, x, u, alpha0, alpha, preci1, preci2, threshold0));
70
+    return rcpp_result_gen;
71
+END_RCPP
72
+}
73
+// NBthmDE_gradM
74
+arma::mat NBthmDE_gradM(arma::vec& y, arma::mat& X, arma::mat& Z, arma::vec& x, arma::mat& u_mat, arma::vec& alpha0, arma::vec& alpha, arma::mat& preci1, double preci2, double threshold0);
75
+RcppExport SEXP _GeoDiff_NBthmDE_gradM(SEXP ySEXP, SEXP XSEXP, SEXP ZSEXP, SEXP xSEXP, SEXP u_matSEXP, SEXP alpha0SEXP, SEXP alphaSEXP, SEXP preci1SEXP, SEXP preci2SEXP, SEXP threshold0SEXP) {
76
+BEGIN_RCPP
77
+    Rcpp::RObject rcpp_result_gen;
78
+    Rcpp::RNGScope rcpp_rngScope_gen;
79
+    Rcpp::traits::input_parameter< arma::vec& >::type y(ySEXP);
80
+    Rcpp::traits::input_parameter< arma::mat& >::type X(XSEXP);
81
+    Rcpp::traits::input_parameter< arma::mat& >::type Z(ZSEXP);
82
+    Rcpp::traits::input_parameter< arma::vec& >::type x(xSEXP);
83
+    Rcpp::traits::input_parameter< arma::mat& >::type u_mat(u_matSEXP);
84
+    Rcpp::traits::input_parameter< arma::vec& >::type alpha0(alpha0SEXP);
85
+    Rcpp::traits::input_parameter< arma::vec& >::type alpha(alphaSEXP);
86
+    Rcpp::traits::input_parameter< arma::mat& >::type preci1(preci1SEXP);
87
+    Rcpp::traits::input_parameter< double >::type preci2(preci2SEXP);
88
+    Rcpp::traits::input_parameter< double >::type threshold0(threshold0SEXP);
89
+    rcpp_result_gen = Rcpp::wrap(NBthmDE_gradM(y, X, Z, x, u_mat, alpha0, alpha, preci1, preci2, threshold0));
90
+    return rcpp_result_gen;
91
+END_RCPP
92
+}
93
+// condi_u
94
+List condi_u(arma::mat& Tem, int ind, arma::vec& u, int temp_size);
95
+RcppExport SEXP _GeoDiff_condi_u(SEXP TemSEXP, SEXP indSEXP, SEXP uSEXP, SEXP temp_sizeSEXP) {
96
+BEGIN_RCPP
97
+    Rcpp::RObject rcpp_result_gen;
98
+    Rcpp::RNGScope rcpp_rngScope_gen;
99
+    Rcpp::traits::input_parameter< arma::mat& >::type Tem(TemSEXP);
100
+    Rcpp::traits::input_parameter< int >::type ind(indSEXP);
101
+    Rcpp::traits::input_parameter< arma::vec& >::type u(uSEXP);
102
+    Rcpp::traits::input_parameter< int >::type temp_size(temp_sizeSEXP);
103
+    rcpp_result_gen = Rcpp::wrap(condi_u(Tem, ind, u, temp_size));
104
+    return rcpp_result_gen;
105
+END_RCPP
106
+}
107
+// NBthmDE_mh
108
+arma::mat NBthmDE_mh(arma::mat& Tem, arma::vec& u, arma::mat& X, arma::mat& Z, arma::vec& y, arma::vec& alpha0, arma::vec& alpha, arma::vec& x, int nmh);
109
+RcppExport SEXP _GeoDiff_NBthmDE_mh(SEXP TemSEXP, SEXP uSEXP, SEXP XSEXP, SEXP ZSEXP, SEXP ySEXP, SEXP alpha0SEXP, SEXP alphaSEXP, SEXP xSEXP, SEXP nmhSEXP) {
110
+BEGIN_RCPP
111
+    Rcpp::RObject rcpp_result_gen;
112
+    Rcpp::RNGScope rcpp_rngScope_gen;
113
+    Rcpp::traits::input_parameter< arma::mat& >::type Tem(TemSEXP);
114
+    Rcpp::traits::input_parameter< arma::vec& >::type u(uSEXP);
115
+    Rcpp::traits::input_parameter< arma::mat& >::type X(XSEXP);
116
+    Rcpp::traits::input_parameter< arma::mat& >::type Z(ZSEXP);
117
+    Rcpp::traits::input_parameter< arma::vec& >::type y(ySEXP);
118
+    Rcpp::traits::input_parameter< arma::vec& >::type alpha0(alpha0SEXP);
119
+    Rcpp::traits::input_parameter< arma::vec& >::type alpha(alphaSEXP);
120
+    Rcpp::traits::input_parameter< arma::vec& >::type x(xSEXP);
121
+    Rcpp::traits::input_parameter< int >::type nmh(nmhSEXP);
122
+    rcpp_result_gen = Rcpp::wrap(NBthmDE_mh(Tem, u, X, Z, y, alpha0, alpha, x, nmh));
123
+    return rcpp_result_gen;
124
+END_RCPP
125
+}
126
+// NBthmDE_fparaOptfeat
127
+List NBthmDE_fparaOptfeat(arma::mat& X, arma::mat& Z, arma::vec& y, arma::vec& alpha0, arma::vec& alpha, arma::mat& preci1, double threshold0, double preci2, arma::mat& u_mat, arma::vec& x0, bool calhes);
128
+RcppExport SEXP _GeoDiff_NBthmDE_fparaOptfeat(SEXP XSEXP, SEXP ZSEXP, SEXP ySEXP, SEXP alpha0SEXP, SEXP alphaSEXP, SEXP preci1SEXP, SEXP threshold0SEXP, SEXP preci2SEXP, SEXP u_matSEXP, SEXP x0SEXP, SEXP calhesSEXP) {
129
+BEGIN_RCPP
130
+    Rcpp::RObject rcpp_result_gen;
131
+    Rcpp::RNGScope rcpp_rngScope_gen;
132
+    Rcpp::traits::input_parameter< arma::mat& >::type X(XSEXP);
133
+    Rcpp::traits::input_parameter< arma::mat& >::type Z(ZSEXP);
134
+    Rcpp::traits::input_parameter< arma::vec& >::type y(ySEXP);
135
+    Rcpp::traits::input_parameter< arma::vec& >::type alpha0(alpha0SEXP);
136
+    Rcpp::traits::input_parameter< arma::vec& >::type alpha(alphaSEXP);
137
+    Rcpp::traits::input_parameter< arma::mat& >::type preci1(preci1SEXP);
138
+    Rcpp::traits::input_parameter< double >::type threshold0(threshold0SEXP);
139
+    Rcpp::traits::input_parameter< double >::type preci2(preci2SEXP);
140
+    Rcpp::traits::input_parameter< arma::mat& >::type u_mat(u_matSEXP);
141
+    Rcpp::traits::input_parameter< arma::vec& >::type x0(x0SEXP);
142
+    Rcpp::traits::input_parameter< bool >::type calhes(calhesSEXP);
143
+    rcpp_result_gen = Rcpp::wrap(NBthmDE_fparaOptfeat(X, Z, y, alpha0, alpha, preci1, threshold0, preci2, u_mat, x0, calhes));
144
+    return rcpp_result_gen;
145
+END_RCPP
146
+}
147
+// NBthmDE_uOpt
148
+List NBthmDE_uOpt(arma::vec& u0, arma::mat& X, arma::mat& Z, arma::vec& y, arma::vec& alpha0, arma::vec& alpha, arma::vec& x, arma::mat& preciu, bool calhes);
149
+RcppExport SEXP _GeoDiff_NBthmDE_uOpt(SEXP u0SEXP, SEXP XSEXP, SEXP ZSEXP, SEXP ySEXP, SEXP alpha0SEXP, SEXP alphaSEXP, SEXP xSEXP, SEXP preciuSEXP, SEXP calhesSEXP) {
150
+BEGIN_RCPP
151
+    Rcpp::RObject rcpp_result_gen;
152
+    Rcpp::RNGScope rcpp_rngScope_gen;
153
+    Rcpp::traits::input_parameter< arma::vec& >::type u0(u0SEXP);
154
+    Rcpp::traits::input_parameter< arma::mat& >::type X(XSEXP);
155
+    Rcpp::traits::input_parameter< arma::mat& >::type Z(ZSEXP);
156
+    Rcpp::traits::input_parameter< arma::vec& >::type y(ySEXP);
157
+    Rcpp::traits::input_parameter< arma::vec& >::type alpha0(alpha0SEXP);
158
+    Rcpp::traits::input_parameter< arma::vec& >::type alpha(alphaSEXP);
159
+    Rcpp::traits::input_parameter< arma::vec& >::type x(xSEXP);
160
+    Rcpp::traits::input_parameter< arma::mat& >::type preciu(preciuSEXP);
161
+    Rcpp::traits::input_parameter< bool >::type calhes(calhesSEXP);
162
+    rcpp_result_gen = Rcpp::wrap(NBthmDE_uOpt(u0, X, Z, y, alpha0, alpha, x, preciu, calhes));
163
+    return rcpp_result_gen;
164
+END_RCPP
165
+}
166
+// PoisthNorm_paraOptfeat
167
+List PoisthNorm_paraOptfeat(arma::vec y, arma::mat& X, arma::vec alpha0, arma::vec alpha, arma::mat& preci1, double preci2, double threshold0, bool calhes);
168
+RcppExport SEXP _GeoDiff_PoisthNorm_paraOptfeat(SEXP ySEXP, SEXP XSEXP, SEXP alpha0SEXP, SEXP alphaSEXP, SEXP preci1SEXP, SEXP preci2SEXP, SEXP threshold0SEXP, SEXP calhesSEXP) {
169
+BEGIN_RCPP
170
+    Rcpp::RObject rcpp_result_gen;
171
+    Rcpp::RNGScope rcpp_rngScope_gen;
172
+    Rcpp::traits::input_parameter< arma::vec >::type y(ySEXP);
173
+    Rcpp::traits::input_parameter< arma::mat& >::type X(XSEXP);
174
+    Rcpp::traits::input_parameter< arma::vec >::type alpha0(alpha0SEXP);
175
+    Rcpp::traits::input_parameter< arma::vec >::type alpha(alphaSEXP);
176
+    Rcpp::traits::input_parameter< arma::mat& >::type preci1(preci1SEXP);
177
+    Rcpp::traits::input_parameter< double >::type preci2(preci2SEXP);
178
+    Rcpp::traits::input_parameter< double >::type threshold0(threshold0SEXP);
179
+    Rcpp::traits::input_parameter< bool >::type calhes(calhesSEXP);
180
+    rcpp_result_gen = Rcpp::wrap(PoisthNorm_paraOptfeat(y, X, alpha0, alpha, preci1, preci2, threshold0, calhes));
181
+    return rcpp_result_gen;
182
+END_RCPP
183
+}
184
+// PoisthNorm_paraOptall
185
+List PoisthNorm_paraOptall(arma::mat& Y, arma::mat& X, arma::vec& alpha0, arma::vec& alpha, arma::mat& preci1, arma::vec& threshold0, double preci2, bool sizescale, bool calhes);
186
+RcppExport SEXP _GeoDiff_PoisthNorm_paraOptall(SEXP YSEXP, SEXP XSEXP, SEXP alpha0SEXP, SEXP alphaSEXP, SEXP preci1SEXP, SEXP threshold0SEXP, SEXP preci2SEXP, SEXP sizescaleSEXP, SEXP calhesSEXP) {
187
+BEGIN_RCPP
188
+    Rcpp::RObject rcpp_result_gen;
189
+    Rcpp::RNGScope rcpp_rngScope_gen;
190
+    Rcpp::traits::input_parameter< arma::mat& >::type Y(YSEXP);
191
+    Rcpp::traits::input_parameter< arma::mat& >::type X(XSEXP);
192
+    Rcpp::traits::input_parameter< arma::vec& >::type alpha0(alpha0SEXP);
193
+    Rcpp::traits::input_parameter< arma::vec& >::type alpha(alphaSEXP);
194
+    Rcpp::traits::input_parameter< arma::mat& >::type preci1(preci1SEXP);
195
+    Rcpp::traits::input_parameter< arma::vec& >::type threshold0(threshold0SEXP);
196
+    Rcpp::traits::input_parameter< double >::type preci2(preci2SEXP);
197
+    Rcpp::traits::input_parameter< bool >::type sizescale(sizescaleSEXP);
198
+    Rcpp::traits::input_parameter< bool >::type calhes(calhesSEXP);
199
+    rcpp_result_gen = Rcpp::wrap(PoisthNorm_paraOptall(Y, X, alpha0, alpha, preci1, threshold0, preci2, sizescale, calhes));
200
+    return rcpp_result_gen;
201
+END_RCPP
202
+}
203
+// dnbinom_mu_vec
204
+arma::vec dnbinom_mu_vec(arma::vec x, double sz, arma::vec mu, int lg);
205
+RcppExport SEXP _GeoDiff_dnbinom_mu_vec(SEXP xSEXP, SEXP szSEXP, SEXP muSEXP, SEXP lgSEXP) {
206
+BEGIN_RCPP
207
+    Rcpp::RObject rcpp_result_gen;
208
+    Rcpp::RNGScope rcpp_rngScope_gen;
209
+    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
210
+    Rcpp::traits::input_parameter< double >::type sz(szSEXP);
211
+    Rcpp::traits::input_parameter< arma::vec >::type mu(muSEXP);
212
+    Rcpp::traits::input_parameter< int >::type lg(lgSEXP);
213
+    rcpp_result_gen = Rcpp::wrap(dnbinom_mu_vec(x, sz, mu, lg));
214
+    return rcpp_result_gen;
215
+END_RCPP
216
+}
217
+
218
+static const R_CallMethodDef CallEntries[] = {
219
+    {"_GeoDiff_NBthDE_paraOptfeat", (DL_FUNC) &_GeoDiff_NBthDE_paraOptfeat, 9},
220
+    {"_GeoDiff_NBthDE_paraOptall", (DL_FUNC) &_GeoDiff_NBthDE_paraOptall, 10},
221
+    {"_GeoDiff_NBthmDE_grad", (DL_FUNC) &_GeoDiff_NBthmDE_grad, 10},
222
+    {"_GeoDiff_NBthmDE_gradM", (DL_FUNC) &_GeoDiff_NBthmDE_gradM, 10},
223
+    {"_GeoDiff_condi_u", (DL_FUNC) &_GeoDiff_condi_u, 4},
224
+    {"_GeoDiff_NBthmDE_mh", (DL_FUNC) &_GeoDiff_NBthmDE_mh, 9},
225
+    {"_GeoDiff_NBthmDE_fparaOptfeat", (DL_FUNC) &_GeoDiff_NBthmDE_fparaOptfeat, 11},
226
+    {"_GeoDiff_NBthmDE_uOpt", (DL_FUNC) &_GeoDiff_NBthmDE_uOpt, 9},
227
+    {"_GeoDiff_PoisthNorm_paraOptfeat", (DL_FUNC) &_GeoDiff_PoisthNorm_paraOptfeat, 8},
228
+    {"_GeoDiff_PoisthNorm_paraOptall", (DL_FUNC) &_GeoDiff_PoisthNorm_paraOptall, 9},
229
+    {"_GeoDiff_dnbinom_mu_vec", (DL_FUNC) &_GeoDiff_dnbinom_mu_vec, 4},
230
+    {NULL, NULL, 0}
231
+};
232
+
233
+RcppExport void R_init_GeoDiff(DllInfo *dll) {
234
+    R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
235
+    R_useDynamicSymbols(dll, FALSE);
236
+}