24 lines
698 B
C
24 lines
698 B
C
#include <R.h>
|
|
#include <Rinternals.h>
|
|
#include <R_ext/Rdynload.h>
|
|
|
|
// extern SEXP FastPOI_C_sub(SEXP in_B, SEXP in_Delta,
|
|
// SEXP in_lambda, SEXP in_maxit, SEXP in_tol
|
|
// );
|
|
|
|
/* Tensor Times Matrix a.k.a. Mode Product */
|
|
extern SEXP ttm(SEXP A, SEXP X, SEXP mode);
|
|
|
|
/* List of registered routines (e.g. C entry points) */
|
|
static const R_CallMethodDef CallEntries[] = {
|
|
// {"FastPOI_C_sub", (DL_FUNC) &FastPOI_C_sub, 5}, // NOT USED
|
|
{"C_ttm", (DL_FUNC) &ttm, 3},
|
|
{NULL, NULL, 0}
|
|
};
|
|
|
|
/* Restrict C entry points to registered routines. */
|
|
void R_init_tensorPredictors(DllInfo *dll) {
|
|
R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
|
|
R_useDynamicSymbols(dll, FALSE);
|
|
}
|