19 using namespace Eigen;
23 template <
class Type,
class From>
26 for(
int i=0;i<n;i++)x[i]=Type(px[i]);
34 if(!Rf_isArray(x))Rf_error(
"NOT AN ARRAY!");
35 SEXP dim=Rf_getAttrib(x,R_DimSymbol);
36 vector<int> d=asVector<int,int>(INTEGER(dim), LENGTH(dim));
37 vector<Type> y=asVector<Type,double>(REAL(x), LENGTH(x));
vector< Type > asVector(SEXP x)
Construct c++-vector from SEXP object.
Vector class used by TMB.
Utility functions for TMB (automatically included)