Re: [Rcpp-devel] Delayed usage of auxiliary memory in RcppArmadillo

2013-06-14 Thread Simon Zehnder
Hi Rcpp::Devels and Rcpp::Users, I would like to close my post with a solution I found after some days of experiencing: If you want to create an Armadillo matrix conditional on a statement and that matrix should reuse R storage you can work with a pointer, 1. Create an R list object: r

Re: [Rcpp-devel] Delayed usage of auxiliary memory in RcppArmadillo

2013-06-11 Thread Simon Zehnder
Hi Romain, thanks for refreshing my C++ basics As I am regrettably not privileged to spare the amount of time on C++ skill improvement I would like to, but have the assignment to construct stochastic models and implement them, I focus here on a solution and maybe someone can help me, with his e

Re: [Rcpp-devel] Delayed usage of auxiliary memory in RcppArmadillo

2013-06-10 Thread romain
Some C++ 101 insights below. Le 2013-06-10 23:07, Simon Zehnder a écrit : Dear Rcpp::Devels and Rcpp::Users, I am temporarily experiencing with a delayed assignment of auxiliary memory in RcppArmadillo: Declare a matrix from which you know you may need it arma::mat maybeM; (In C++ a declarat

[Rcpp-devel] Delayed usage of auxiliary memory in RcppArmadillo

2013-06-10 Thread Simon Zehnder
Dear Rcpp::Devels and Rcpp::Users, I am temporarily experiencing with a delayed assignment of auxiliary memory in RcppArmadillo: Declare a matrix from which you know you may need it arma::mat maybeM; (In C++ a declaration makes only known the type and name but allocates no storage yet). Now