search for: std_vector

Displaying 2 results from an estimated 2 matches for "std_vector".

Did you mean: add_vector
2007 Aug 16
0
call R function in c++ program
...quot;, "rnorm"...) but I can't use library My class are : // in constructor int argc = 1; char *argv[] = {"wxR"}; Rf_initEmbeddedR(argc, argv); rho = R_GlobalEnv; // in destructor Rf_endEmbeddedR(0); // for translate std::vector to SEXP VECTOR // std_vector are defined as "vector<double>" and iterator as "vector<double>::iterator" PROTECT( vector_SEXP = allocVector(REALSXP, std_vector.size()) ); int i = 0; for(std_iterator s_it=std_vector.begin(); s_it!=std_vector.end(); s_it++) { REAL(vecto...
2008 Nov 06
2
Fwd: SWIG with R and C++ STL
...l, I am new to SWIG. I encountered some problem when I try to SWIG to R some C++ modules. Here is the details. I got "myvector.i" and "myvector.h" as my two input files, the contends are: ---myvector.i----- %module myvector %{ #include "myvector.h" %} %include "std_vector.i" namespace std { %template(IntVector) vector<int>; %template(DoubleVector) vector<double>; }; %include "myvector.h" ---------------------------------- --myvector.h------------------- /* File : example.h */ #include <vector> #include <algorithm> #...