Update Rcpp::NumericMatrix passed by reference using RcppArmadillo submat()
问题 Following on this question, I am trying to understand how to efficiently update a subset of a Rccp::NumericMatrix data type. I have the following scenario: Rcpp::NumericMatrix m of 5 x 5 that needs few rows and columns updated. It will be passed by reference to a function ( void return type) that will convert it to an arma::mat , and update the respective submat() . At this point I don't understand how to " apply " the changes that occurred inside the function to the m matrix that was passed