[Yuima-commits] r827 - pkg/yuima/src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Dec 5 19:42:17 CET 2022


Author: phoenix844
Date: 2022-12-05 19:42:17 +0100 (Mon, 05 Dec 2022)
New Revision: 827

Modified:
   pkg/yuima/src/RcppExports.cpp
   pkg/yuima/src/ae.cpp
   pkg/yuima/src/yuima_init.c
Log:
Remove cpp_to_str

Modified: pkg/yuima/src/RcppExports.cpp
===================================================================
--- pkg/yuima/src/RcppExports.cpp	2022-12-05 05:29:54 UTC (rev 826)
+++ pkg/yuima/src/RcppExports.cpp	2022-12-05 18:42:17 UTC (rev 827)
@@ -151,17 +151,6 @@
     return rcpp_result_gen;
 END_RCPP
 }
-// cpp_to_str
-std::string cpp_to_str(int const& i);
-RcppExport SEXP _yuima_cpp_to_str(SEXP iSEXP) {
-BEGIN_RCPP
-    Rcpp::RObject rcpp_result_gen;
-    Rcpp::RNGScope rcpp_rngScope_gen;
-    Rcpp::traits::input_parameter< int const& >::type i(iSEXP);
-    rcpp_result_gen = Rcpp::wrap(cpp_to_str(i));
-    return rcpp_result_gen;
-END_RCPP
-}
 // cpp_label
 std::string cpp_label(std::vector<int> I);
 RcppExport SEXP _yuima_cpp_label(SEXP ISEXP) {

Modified: pkg/yuima/src/ae.cpp
===================================================================
--- pkg/yuima/src/ae.cpp	2022-12-05 05:29:54 UTC (rev 826)
+++ pkg/yuima/src/ae.cpp	2022-12-05 18:42:17 UTC (rev 827)
@@ -141,21 +141,12 @@
 } 
 
 // [[Rcpp::export]]
-std::string cpp_to_str(int const &i){
-  char tmp[10];
-//  sprintf(tmp, "%d", i);
-  return(std::string(tmp));
-}
-
-// [[Rcpp::export]]
 std::string cpp_label(std::vector<int> I){
   
-//  std::string s = cpp_to_str(I[0]);
   std::string s = std::to_string(I[0]);
   
   int n = I.size();
   if(n>1) for(int i=1; i<n; i++) {
-//    s += "," + cpp_to_str(I[i]);
     s += "," + std::to_string(I[i]);
   }
   
@@ -369,8 +360,6 @@
           for ( it2 = it1->second.begin(); it2 != it1->second.end(); it2++ ) {
             if(str=="") str = std::to_string(it2->second) + " * " + it2->first;
             else str += "+" + std::to_string(it2->second) + " * " + it2->first;
-//            if(str=="") str = cpp_to_str(it2->second) + " * " + it2->first;
-//            else str += "+" + cpp_to_str(it2->second) + " * " + it2->first;
           }
           if(rhs[i]=="") rhs[i] = "(" + str + ") * " + it1->first;
           else rhs[i] += " + (" + str + ") * " + it1->first;

Modified: pkg/yuima/src/yuima_init.c
===================================================================
--- pkg/yuima/src/yuima_init.c	2022-12-05 05:29:54 UTC (rev 826)
+++ pkg/yuima/src/yuima_init.c	2022-12-05 18:42:17 UTC (rev 827)
@@ -1,112 +1,110 @@
-#include <R.h>
-#include <Rinternals.h>
-#include <stdlib.h> // for NULL
-#include <R_ext/Rdynload.h>
-
-/* FIXME:
-   Check these declarations against the C/Fortran source code.
-*/
-
-/* .C calls */
-extern void bibsynchro(void *, void *, void *, void *, void *, void *, void *, void *, void *);
-extern void ctsubsampling(void *, void *, void *, void *, void *, void *, void *);
-extern void HayashiYoshida(void *, void *, void *, void *, void *, void *, void *);
-extern void hyavar(void *, void *, void *, void *, void *, void *, void *, void *, void *);
-extern void hycrossavar(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *);
-extern void HYcrosscorr(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *);
-extern void HYcrosscorr2(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *);
-extern void HYcrosscov(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *);
-extern void HYcrosscov2(void *, void *, void *, void *, void *, void *, void *, void *, void *);
-extern void krprod(void *, void *, void *, void *);
-extern void msrc(void *, void *, void *, void *, void *, void *, void *);
-extern void pHayashiYoshida(void *, void *, void *, void *, void *, void *, void *, void *);
-extern void refreshsampling(void *, void *, void *, void *, void *, void *, void *, void *, void *);
-extern void refreshsamplingphy(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *);
-extern void rGIG(void *, void *, void *, void *, void *);
-extern void rpts(void *, void *, void *, void *, void *);
-
-/* .Call calls */
-extern SEXP _yuima_cpp_collapse(SEXP, SEXP);
-extern SEXP _yuima_cpp_E(SEXP);
-extern SEXP _yuima_cpp_ito(SEXP, SEXP, SEXP, SEXP, SEXP);
-extern SEXP _yuima_cpp_ito_outer(SEXP, SEXP);
-extern SEXP _yuima_cpp_ito_product(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
-extern SEXP _yuima_cpp_label(SEXP);
-extern SEXP _yuima_cpp_outer(SEXP, SEXP);
-extern SEXP _yuima_cpp_paste(SEXP, SEXP, SEXP);
-extern SEXP _yuima_cpp_split(SEXP, SEXP);
-extern SEXP _yuima_cpp_to_str(SEXP);
-extern SEXP _yuima_detcpp(SEXP);
-extern SEXP _yuima_evalKernelCpp(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
-extern SEXP _yuima_evalKernelCpp2(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
-extern SEXP _yuima_Irregular_PseudoLoglik_COG(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
-extern SEXP _yuima_is_zero(SEXP);
-extern SEXP _yuima_likndim(SEXP, SEXP, SEXP, SEXP);
-extern SEXP _yuima_makeprop(SEXP, SEXP, SEXP, SEXP);
-extern SEXP _yuima_residualCpp(SEXP, SEXP, SEXP, SEXP, SEXP);
-extern SEXP _yuima_Smake(SEXP, SEXP);
-extern SEXP _yuima_solvecpp(SEXP);
-extern SEXP _yuima_sqnorm(SEXP);
-extern SEXP _yuima_sub_f(SEXP, SEXP);
-extern SEXP _yuima_W1(SEXP, SEXP, SEXP, SEXP);
-extern SEXP _yuima_W2(SEXP, SEXP, SEXP);
-extern SEXP Cycle_Carma(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
-extern SEXP euler(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
-extern SEXP pseudoLoglik_COGARCH1(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
-
-static const R_CMethodDef CEntries[] = {
-    {"bibsynchro",         (DL_FUNC) &bibsynchro,          9},
-    {"ctsubsampling",      (DL_FUNC) &ctsubsampling,       7},
-    {"HayashiYoshida",     (DL_FUNC) &HayashiYoshida,      7},
-    {"hyavar",             (DL_FUNC) &hyavar,              9},
-    {"hycrossavar",        (DL_FUNC) &hycrossavar,        19},
-    {"HYcrosscorr",        (DL_FUNC) &HYcrosscorr,        12},
-    {"HYcrosscorr2",       (DL_FUNC) &HYcrosscorr2,       11},
-    {"HYcrosscov",         (DL_FUNC) &HYcrosscov,         10},
-    {"HYcrosscov2",        (DL_FUNC) &HYcrosscov2,         9},
-    {"krprod",             (DL_FUNC) &krprod,              4},
-    {"msrc",               (DL_FUNC) &msrc,                7},
-    {"pHayashiYoshida",    (DL_FUNC) &pHayashiYoshida,     8},
-    {"refreshsampling",    (DL_FUNC) &refreshsampling,     9},
-    {"refreshsamplingphy", (DL_FUNC) &refreshsamplingphy, 10},
-    {"rGIG",               (DL_FUNC) &rGIG,                5},
-    {"rpts",               (DL_FUNC) &rpts,                5},
-    {NULL, NULL, 0}
-};
-
-static const R_CallMethodDef CallEntries[] = {
-    {"_yuima_cpp_collapse",               (DL_FUNC) &_yuima_cpp_collapse,                2},
-    {"_yuima_cpp_E",                      (DL_FUNC) &_yuima_cpp_E,                       1},
-    {"_yuima_cpp_ito",                    (DL_FUNC) &_yuima_cpp_ito,                     5},
-    {"_yuima_cpp_ito_outer",              (DL_FUNC) &_yuima_cpp_ito_outer,               2},
-    {"_yuima_cpp_ito_product",            (DL_FUNC) &_yuima_cpp_ito_product,             8},
-    {"_yuima_cpp_label",                  (DL_FUNC) &_yuima_cpp_label,                   1},
-    {"_yuima_cpp_outer",                  (DL_FUNC) &_yuima_cpp_outer,                   2},
-    {"_yuima_cpp_paste",                  (DL_FUNC) &_yuima_cpp_paste,                   3},
-    {"_yuima_cpp_split",                  (DL_FUNC) &_yuima_cpp_split,                   2},
-    {"_yuima_cpp_to_str",                 (DL_FUNC) &_yuima_cpp_to_str,                  1},
-    {"_yuima_detcpp",                     (DL_FUNC) &_yuima_detcpp,                      1},
-    {"_yuima_evalKernelCpp",              (DL_FUNC) &_yuima_evalKernelCpp,              10},
-    {"_yuima_evalKernelCpp2",             (DL_FUNC) &_yuima_evalKernelCpp2,             13},
-    {"_yuima_Irregular_PseudoLoglik_COG", (DL_FUNC) &_yuima_Irregular_PseudoLoglik_COG, 15},
-    {"_yuima_is_zero",                    (DL_FUNC) &_yuima_is_zero,                     1},
-    {"_yuima_likndim",                    (DL_FUNC) &_yuima_likndim,                     4},
-    {"_yuima_makeprop",                   (DL_FUNC) &_yuima_makeprop,                    4},
-    {"_yuima_residualCpp",                (DL_FUNC) &_yuima_residualCpp,                 5},
-    {"_yuima_Smake",                      (DL_FUNC) &_yuima_Smake,                       2},
-    {"_yuima_solvecpp",                   (DL_FUNC) &_yuima_solvecpp,                    1},
-    {"_yuima_sqnorm",                     (DL_FUNC) &_yuima_sqnorm,                      1},
-    {"_yuima_sub_f",                      (DL_FUNC) &_yuima_sub_f,                       2},
-    {"_yuima_W1",                         (DL_FUNC) &_yuima_W1,                          4},
-    {"_yuima_W2",                         (DL_FUNC) &_yuima_W2,                          3},
-    {"Cycle_Carma",                       (DL_FUNC) &Cycle_Carma,                       12},
-    {"euler",                             (DL_FUNC) &euler,                             11},
-    {"pseudoLoglik_COGARCH1",             (DL_FUNC) &pseudoLoglik_COGARCH1,             14},
-    {NULL, NULL, 0}
-};
-
-void R_init_yuima(DllInfo *dll)
-{
-    R_registerRoutines(dll, CEntries, CallEntries, NULL, NULL);
-    R_useDynamicSymbols(dll, FALSE);
-}
+#include <R.h>
+#include <Rinternals.h>
+#include <stdlib.h> // for NULL
+#include <R_ext/Rdynload.h>
+
+/* FIXME:
+   Check these declarations against the C/Fortran source code.
+*/
+
+/* .C calls */
+extern void bibsynchro(void *, void *, void *, void *, void *, void *, void *, void *, void *);
+extern void ctsubsampling(void *, void *, void *, void *, void *, void *, void *);
+extern void HayashiYoshida(void *, void *, void *, void *, void *, void *, void *);
+extern void hyavar(void *, void *, void *, void *, void *, void *, void *, void *, void *);
+extern void hycrossavar(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *);
+extern void HYcrosscorr(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *);
+extern void HYcrosscorr2(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *);
+extern void HYcrosscov(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *);
+extern void HYcrosscov2(void *, void *, void *, void *, void *, void *, void *, void *, void *);
+extern void krprod(void *, void *, void *, void *);
+extern void msrc(void *, void *, void *, void *, void *, void *, void *);
+extern void pHayashiYoshida(void *, void *, void *, void *, void *, void *, void *, void *);
+extern void refreshsampling(void *, void *, void *, void *, void *, void *, void *, void *, void *);
+extern void refreshsamplingphy(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *);
+extern void rGIG(void *, void *, void *, void *, void *);
+extern void rpts(void *, void *, void *, void *, void *);
+
+/* .Call calls */
+extern SEXP _yuima_cpp_collapse(SEXP, SEXP);
+extern SEXP _yuima_cpp_E(SEXP);
+extern SEXP _yuima_cpp_ito(SEXP, SEXP, SEXP, SEXP, SEXP);
+extern SEXP _yuima_cpp_ito_outer(SEXP, SEXP);
+extern SEXP _yuima_cpp_ito_product(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
+extern SEXP _yuima_cpp_label(SEXP);
+extern SEXP _yuima_cpp_outer(SEXP, SEXP);
+extern SEXP _yuima_cpp_paste(SEXP, SEXP, SEXP);
+extern SEXP _yuima_cpp_split(SEXP, SEXP);
+extern SEXP _yuima_detcpp(SEXP);
+extern SEXP _yuima_evalKernelCpp(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
+extern SEXP _yuima_evalKernelCpp2(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
+extern SEXP _yuima_Irregular_PseudoLoglik_COG(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
+extern SEXP _yuima_is_zero(SEXP);
+extern SEXP _yuima_likndim(SEXP, SEXP, SEXP, SEXP);
+extern SEXP _yuima_makeprop(SEXP, SEXP, SEXP, SEXP);
+extern SEXP _yuima_residualCpp(SEXP, SEXP, SEXP, SEXP, SEXP);
+extern SEXP _yuima_Smake(SEXP, SEXP);
+extern SEXP _yuima_solvecpp(SEXP);
+extern SEXP _yuima_sqnorm(SEXP);
+extern SEXP _yuima_sub_f(SEXP, SEXP);
+extern SEXP _yuima_W1(SEXP, SEXP, SEXP, SEXP);
+extern SEXP _yuima_W2(SEXP, SEXP, SEXP);
+extern SEXP Cycle_Carma(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
+extern SEXP euler(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
+extern SEXP pseudoLoglik_COGARCH1(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
+
+static const R_CMethodDef CEntries[] = {
+    {"bibsynchro",         (DL_FUNC) &bibsynchro,          9},
+    {"ctsubsampling",      (DL_FUNC) &ctsubsampling,       7},
+    {"HayashiYoshida",     (DL_FUNC) &HayashiYoshida,      7},
+    {"hyavar",             (DL_FUNC) &hyavar,              9},
+    {"hycrossavar",        (DL_FUNC) &hycrossavar,        19},
+    {"HYcrosscorr",        (DL_FUNC) &HYcrosscorr,        12},
+    {"HYcrosscorr2",       (DL_FUNC) &HYcrosscorr2,       11},
+    {"HYcrosscov",         (DL_FUNC) &HYcrosscov,         10},
+    {"HYcrosscov2",        (DL_FUNC) &HYcrosscov2,         9},
+    {"krprod",             (DL_FUNC) &krprod,              4},
+    {"msrc",               (DL_FUNC) &msrc,                7},
+    {"pHayashiYoshida",    (DL_FUNC) &pHayashiYoshida,     8},
+    {"refreshsampling",    (DL_FUNC) &refreshsampling,     9},
+    {"refreshsamplingphy", (DL_FUNC) &refreshsamplingphy, 10},
+    {"rGIG",               (DL_FUNC) &rGIG,                5},
+    {"rpts",               (DL_FUNC) &rpts,                5},
+    {NULL, NULL, 0}
+};
+
+static const R_CallMethodDef CallEntries[] = {
+    {"_yuima_cpp_collapse",               (DL_FUNC) &_yuima_cpp_collapse,                2},
+    {"_yuima_cpp_E",                      (DL_FUNC) &_yuima_cpp_E,                       1},
+    {"_yuima_cpp_ito",                    (DL_FUNC) &_yuima_cpp_ito,                     5},
+    {"_yuima_cpp_ito_outer",              (DL_FUNC) &_yuima_cpp_ito_outer,               2},
+    {"_yuima_cpp_ito_product",            (DL_FUNC) &_yuima_cpp_ito_product,             8},
+    {"_yuima_cpp_label",                  (DL_FUNC) &_yuima_cpp_label,                   1},
+    {"_yuima_cpp_outer",                  (DL_FUNC) &_yuima_cpp_outer,                   2},
+    {"_yuima_cpp_paste",                  (DL_FUNC) &_yuima_cpp_paste,                   3},
+    {"_yuima_cpp_split",                  (DL_FUNC) &_yuima_cpp_split,                   2},
+    {"_yuima_detcpp",                     (DL_FUNC) &_yuima_detcpp,                      1},
+    {"_yuima_evalKernelCpp",              (DL_FUNC) &_yuima_evalKernelCpp,              10},
+    {"_yuima_evalKernelCpp2",             (DL_FUNC) &_yuima_evalKernelCpp2,             13},
+    {"_yuima_Irregular_PseudoLoglik_COG", (DL_FUNC) &_yuima_Irregular_PseudoLoglik_COG, 15},
+    {"_yuima_is_zero",                    (DL_FUNC) &_yuima_is_zero,                     1},
+    {"_yuima_likndim",                    (DL_FUNC) &_yuima_likndim,                     4},
+    {"_yuima_makeprop",                   (DL_FUNC) &_yuima_makeprop,                    4},
+    {"_yuima_residualCpp",                (DL_FUNC) &_yuima_residualCpp,                 5},
+    {"_yuima_Smake",                      (DL_FUNC) &_yuima_Smake,                       2},
+    {"_yuima_solvecpp",                   (DL_FUNC) &_yuima_solvecpp,                    1},
+    {"_yuima_sqnorm",                     (DL_FUNC) &_yuima_sqnorm,                      1},
+    {"_yuima_sub_f",                      (DL_FUNC) &_yuima_sub_f,                       2},
+    {"_yuima_W1",                         (DL_FUNC) &_yuima_W1,                          4},
+    {"_yuima_W2",                         (DL_FUNC) &_yuima_W2,                          3},
+    {"Cycle_Carma",                       (DL_FUNC) &Cycle_Carma,                       12},
+    {"euler",                             (DL_FUNC) &euler,                             11},
+    {"pseudoLoglik_COGARCH1",             (DL_FUNC) &pseudoLoglik_COGARCH1,             14},
+    {NULL, NULL, 0}
+};
+
+void R_init_yuima(DllInfo *dll)
+{
+    R_registerRoutines(dll, CEntries, CallEntries, NULL, NULL);
+    R_useDynamicSymbols(dll, FALSE);
+}



More information about the Yuima-commits mailing list