-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRcppExports.cpp
More file actions
127 lines (122 loc) · 6.8 KB
/
RcppExports.cpp
File metadata and controls
127 lines (122 loc) · 6.8 KB
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
// Generated by using Rcpp::compileAttributes() -> do not edit by hand
// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#include <Rcpp.h>
using namespace Rcpp;
// calculateSijMatrix
NumericMatrix calculateSijMatrix(NumericVector Fi, NumericMatrix Pij, NumericVector lambda_sig, CharacterVector region_IDs);
RcppExport SEXP _movingModelRcpp_calculateSijMatrix(SEXP FiSEXP, SEXP PijSEXP, SEXP lambda_sigSEXP, SEXP region_IDsSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< NumericVector >::type Fi(FiSEXP);
Rcpp::traits::input_parameter< NumericMatrix >::type Pij(PijSEXP);
Rcpp::traits::input_parameter< NumericVector >::type lambda_sig(lambda_sigSEXP);
Rcpp::traits::input_parameter< CharacterVector >::type region_IDs(region_IDsSEXP);
rcpp_result_gen = Rcpp::wrap(calculateSijMatrix(Fi, Pij, lambda_sig, region_IDs));
return rcpp_result_gen;
END_RCPP
}
// delta_SEIR_cpp
NumericVector delta_SEIR_cpp(NumericVector event);
RcppExport SEXP _movingModelRcpp_delta_SEIR_cpp(SEXP eventSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< NumericVector >::type event(eventSEXP);
rcpp_result_gen = Rcpp::wrap(delta_SEIR_cpp(event));
return rcpp_result_gen;
END_RCPP
}
// event_rate_coloc_cpp
NumericVector event_rate_coloc_cpp(NumericVector SEIR_vector, int numpatch, float Di, float De, NumericMatrix R0_matrix, IntegerVector N);
RcppExport SEXP _movingModelRcpp_event_rate_coloc_cpp(SEXP SEIR_vectorSEXP, SEXP numpatchSEXP, SEXP DiSEXP, SEXP DeSEXP, SEXP R0_matrixSEXP, SEXP NSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< NumericVector >::type SEIR_vector(SEIR_vectorSEXP);
Rcpp::traits::input_parameter< int >::type numpatch(numpatchSEXP);
Rcpp::traits::input_parameter< float >::type Di(DiSEXP);
Rcpp::traits::input_parameter< float >::type De(DeSEXP);
Rcpp::traits::input_parameter< NumericMatrix >::type R0_matrix(R0_matrixSEXP);
Rcpp::traits::input_parameter< IntegerVector >::type N(NSEXP);
rcpp_result_gen = Rcpp::wrap(event_rate_coloc_cpp(SEIR_vector, numpatch, Di, De, R0_matrix, N));
return rcpp_result_gen;
END_RCPP
}
// event_rate_move_cpp
NumericVector event_rate_move_cpp(NumericVector SEIR_vector, int numpatch, float Di, float De, NumericVector R0, IntegerVector N, NumericMatrix P);
RcppExport SEXP _movingModelRcpp_event_rate_move_cpp(SEXP SEIR_vectorSEXP, SEXP numpatchSEXP, SEXP DiSEXP, SEXP DeSEXP, SEXP R0SEXP, SEXP NSEXP, SEXP PSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< NumericVector >::type SEIR_vector(SEIR_vectorSEXP);
Rcpp::traits::input_parameter< int >::type numpatch(numpatchSEXP);
Rcpp::traits::input_parameter< float >::type Di(DiSEXP);
Rcpp::traits::input_parameter< float >::type De(DeSEXP);
Rcpp::traits::input_parameter< NumericVector >::type R0(R0SEXP);
Rcpp::traits::input_parameter< IntegerVector >::type N(NSEXP);
Rcpp::traits::input_parameter< NumericMatrix >::type P(PSEXP);
rcpp_result_gen = Rcpp::wrap(event_rate_move_cpp(SEIR_vector, numpatch, Di, De, R0, N, P));
return rcpp_result_gen;
END_RCPP
}
// getMijMatrix
NumericMatrix getMijMatrix(NumericVector Fi, NumericMatrix Pij, NumericVector Ni, NumericVector lambda_sig, CharacterVector region_IDs);
RcppExport SEXP _movingModelRcpp_getMijMatrix(SEXP FiSEXP, SEXP PijSEXP, SEXP NiSEXP, SEXP lambda_sigSEXP, SEXP region_IDsSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< NumericVector >::type Fi(FiSEXP);
Rcpp::traits::input_parameter< NumericMatrix >::type Pij(PijSEXP);
Rcpp::traits::input_parameter< NumericVector >::type Ni(NiSEXP);
Rcpp::traits::input_parameter< NumericVector >::type lambda_sig(lambda_sigSEXP);
Rcpp::traits::input_parameter< CharacterVector >::type region_IDs(region_IDsSEXP);
rcpp_result_gen = Rcpp::wrap(getMijMatrix(Fi, Pij, Ni, lambda_sig, region_IDs));
return rcpp_result_gen;
END_RCPP
}
// gradientDescentStep
Rcpp::List gradientDescentStep(NumericVector Fi, NumericMatrix Sij, NumericMatrix Pij, NumericVector Ni, NumericMatrix Mij_simu, NumericMatrix Mij_real, NumericVector lambda_sig, CharacterVector region_IDs, double alpha_F, double alpha_lambda_sig);
RcppExport SEXP _movingModelRcpp_gradientDescentStep(SEXP FiSEXP, SEXP SijSEXP, SEXP PijSEXP, SEXP NiSEXP, SEXP Mij_simuSEXP, SEXP Mij_realSEXP, SEXP lambda_sigSEXP, SEXP region_IDsSEXP, SEXP alpha_FSEXP, SEXP alpha_lambda_sigSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< NumericVector >::type Fi(FiSEXP);
Rcpp::traits::input_parameter< NumericMatrix >::type Sij(SijSEXP);
Rcpp::traits::input_parameter< NumericMatrix >::type Pij(PijSEXP);
Rcpp::traits::input_parameter< NumericVector >::type Ni(NiSEXP);
Rcpp::traits::input_parameter< NumericMatrix >::type Mij_simu(Mij_simuSEXP);
Rcpp::traits::input_parameter< NumericMatrix >::type Mij_real(Mij_realSEXP);
Rcpp::traits::input_parameter< NumericVector >::type lambda_sig(lambda_sigSEXP);
Rcpp::traits::input_parameter< CharacterVector >::type region_IDs(region_IDsSEXP);
Rcpp::traits::input_parameter< double >::type alpha_F(alpha_FSEXP);
Rcpp::traits::input_parameter< double >::type alpha_lambda_sig(alpha_lambda_sigSEXP);
rcpp_result_gen = Rcpp::wrap(gradientDescentStep(Fi, Sij, Pij, Ni, Mij_simu, Mij_real, lambda_sig, region_IDs, alpha_F, alpha_lambda_sig));
return rcpp_result_gen;
END_RCPP
}
// sigmoid
double sigmoid(double x);
RcppExport SEXP _movingModelRcpp_sigmoid(SEXP xSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< double >::type x(xSEXP);
rcpp_result_gen = Rcpp::wrap(sigmoid(x));
return rcpp_result_gen;
END_RCPP
}
static const R_CallMethodDef CallEntries[] = {
{"_movingModelRcpp_calculateSijMatrix", (DL_FUNC) &_movingModelRcpp_calculateSijMatrix, 4},
{"_movingModelRcpp_delta_SEIR_cpp", (DL_FUNC) &_movingModelRcpp_delta_SEIR_cpp, 1},
{"_movingModelRcpp_event_rate_coloc_cpp", (DL_FUNC) &_movingModelRcpp_event_rate_coloc_cpp, 6},
{"_movingModelRcpp_event_rate_move_cpp", (DL_FUNC) &_movingModelRcpp_event_rate_move_cpp, 7},
{"_movingModelRcpp_getMijMatrix", (DL_FUNC) &_movingModelRcpp_getMijMatrix, 5},
{"_movingModelRcpp_gradientDescentStep", (DL_FUNC) &_movingModelRcpp_gradientDescentStep, 10},
{"_movingModelRcpp_sigmoid", (DL_FUNC) &_movingModelRcpp_sigmoid, 1},
{NULL, NULL, 0}
};
RcppExport void R_init_movingModelRcpp(DllInfo *dll) {
R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
R_useDynamicSymbols(dll, FALSE);
}