forked from tlverse/hal9001
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRcppExports.cpp
160 lines (153 loc) · 6.73 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
// Generated by using Rcpp::compileAttributes() -> do not edit by hand
// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#include "hal9001_types.h"
#include <RcppEigen.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
// index_first_copy
IntegerVector index_first_copy(const MSpMat& X);
RcppExport SEXP _hal9001_index_first_copy(SEXP XSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const MSpMat& >::type X(XSEXP);
rcpp_result_gen = Rcpp::wrap(index_first_copy(X));
return rcpp_result_gen;
END_RCPP
}
// apply_copy_map
SpMat apply_copy_map(const MSpMat X, const List& copy_map);
RcppExport SEXP _hal9001_apply_copy_map(SEXP XSEXP, SEXP copy_mapSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const MSpMat >::type X(XSEXP);
Rcpp::traits::input_parameter< const List& >::type copy_map(copy_mapSEXP);
rcpp_result_gen = Rcpp::wrap(apply_copy_map(X, copy_map));
return rcpp_result_gen;
END_RCPP
}
// lassi_predict
NumericVector lassi_predict(const MSpMat X, const NumericVector beta, double intercept);
RcppExport SEXP _hal9001_lassi_predict(SEXP XSEXP, SEXP betaSEXP, SEXP interceptSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const MSpMat >::type X(XSEXP);
Rcpp::traits::input_parameter< const NumericVector >::type beta(betaSEXP);
Rcpp::traits::input_parameter< double >::type intercept(interceptSEXP);
rcpp_result_gen = Rcpp::wrap(lassi_predict(X, beta, intercept));
return rcpp_result_gen;
END_RCPP
}
// make_basis_list
List make_basis_list(const NumericMatrix& X_sub, const NumericVector& cols, const IntegerVector& order_map);
RcppExport SEXP _hal9001_make_basis_list(SEXP X_subSEXP, SEXP colsSEXP, SEXP order_mapSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const NumericMatrix& >::type X_sub(X_subSEXP);
Rcpp::traits::input_parameter< const NumericVector& >::type cols(colsSEXP);
Rcpp::traits::input_parameter< const IntegerVector& >::type order_map(order_mapSEXP);
rcpp_result_gen = Rcpp::wrap(make_basis_list(X_sub, cols, order_map));
return rcpp_result_gen;
END_RCPP
}
// meets_basis
double meets_basis(const NumericMatrix& X, const int row_num, const IntegerVector& cols, const NumericVector& cutoffs, const IntegerVector& orders);
RcppExport SEXP _hal9001_meets_basis(SEXP XSEXP, SEXP row_numSEXP, SEXP colsSEXP, SEXP cutoffsSEXP, SEXP ordersSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const NumericMatrix& >::type X(XSEXP);
Rcpp::traits::input_parameter< const int >::type row_num(row_numSEXP);
Rcpp::traits::input_parameter< const IntegerVector& >::type cols(colsSEXP);
Rcpp::traits::input_parameter< const NumericVector& >::type cutoffs(cutoffsSEXP);
Rcpp::traits::input_parameter< const IntegerVector& >::type orders(ordersSEXP);
rcpp_result_gen = Rcpp::wrap(meets_basis(X, row_num, cols, cutoffs, orders));
return rcpp_result_gen;
END_RCPP
}
// evaluate_basis
void evaluate_basis(const List& basis, const NumericMatrix& X, SpMat& x_basis, int basis_col);
RcppExport SEXP _hal9001_evaluate_basis(SEXP basisSEXP, SEXP XSEXP, SEXP x_basisSEXP, SEXP basis_colSEXP) {
BEGIN_RCPP
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const List& >::type basis(basisSEXP);
Rcpp::traits::input_parameter< const NumericMatrix& >::type X(XSEXP);
Rcpp::traits::input_parameter< SpMat& >::type x_basis(x_basisSEXP);
Rcpp::traits::input_parameter< int >::type basis_col(basis_colSEXP);
evaluate_basis(basis, X, x_basis, basis_col);
return R_NilValue;
END_RCPP
}
// make_design_matrix
SpMat make_design_matrix(const NumericMatrix& X, const List& blist, double p_reserve);
RcppExport SEXP _hal9001_make_design_matrix(SEXP XSEXP, SEXP blistSEXP, SEXP p_reserveSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const NumericMatrix& >::type X(XSEXP);
Rcpp::traits::input_parameter< const List& >::type blist(blistSEXP);
Rcpp::traits::input_parameter< double >::type p_reserve(p_reserveSEXP);
rcpp_result_gen = Rcpp::wrap(make_design_matrix(X, blist, p_reserve));
return rcpp_result_gen;
END_RCPP
}
// as_dgCMatrix
SEXP as_dgCMatrix(SEXP XX_);
RcppExport SEXP _hal9001_as_dgCMatrix(SEXP XX_SEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< SEXP >::type XX_(XX_SEXP);
rcpp_result_gen = Rcpp::wrap(as_dgCMatrix(XX_));
return rcpp_result_gen;
END_RCPP
}
// calc_pnz
NumericVector calc_pnz(const MSpMat& X);
RcppExport SEXP _hal9001_calc_pnz(SEXP XSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const MSpMat& >::type X(XSEXP);
rcpp_result_gen = Rcpp::wrap(calc_pnz(X));
return rcpp_result_gen;
END_RCPP
}
// calc_xscale
NumericVector calc_xscale(const MSpMat& X, const NumericVector& xcenter);
RcppExport SEXP _hal9001_calc_xscale(SEXP XSEXP, SEXP xcenterSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const MSpMat& >::type X(XSEXP);
Rcpp::traits::input_parameter< const NumericVector& >::type xcenter(xcenterSEXP);
rcpp_result_gen = Rcpp::wrap(calc_xscale(X, xcenter));
return rcpp_result_gen;
END_RCPP
}
RcppExport SEXP _rcpp_module_boot_lassi_module();
static const R_CallMethodDef CallEntries[] = {
{"_hal9001_index_first_copy", (DL_FUNC) &_hal9001_index_first_copy, 1},
{"_hal9001_apply_copy_map", (DL_FUNC) &_hal9001_apply_copy_map, 2},
{"_hal9001_lassi_predict", (DL_FUNC) &_hal9001_lassi_predict, 3},
{"_hal9001_make_basis_list", (DL_FUNC) &_hal9001_make_basis_list, 3},
{"_hal9001_meets_basis", (DL_FUNC) &_hal9001_meets_basis, 5},
{"_hal9001_evaluate_basis", (DL_FUNC) &_hal9001_evaluate_basis, 4},
{"_hal9001_make_design_matrix", (DL_FUNC) &_hal9001_make_design_matrix, 3},
{"_hal9001_as_dgCMatrix", (DL_FUNC) &_hal9001_as_dgCMatrix, 1},
{"_hal9001_calc_pnz", (DL_FUNC) &_hal9001_calc_pnz, 1},
{"_hal9001_calc_xscale", (DL_FUNC) &_hal9001_calc_xscale, 2},
{"_rcpp_module_boot_lassi_module", (DL_FUNC) &_rcpp_module_boot_lassi_module, 0},
{NULL, NULL, 0}
};
RcppExport void R_init_hal9001(DllInfo *dll) {
R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
R_useDynamicSymbols(dll, FALSE);
}