I have tried something like Rcpp::NumericVector nm(Rcpp::Dimension(2,3,4));
But there seems to be a problem due to non-public fields. Am I misunderstanding the purpose of Dimension() here? On Tue, Jun 15, 2010 at 2:19 PM, Romain Francois <[email protected]>wrote: > Le 15/06/10 20:08, Douglas Bates a écrit : > > >> I may be confusing Armadillo classes and Rcpp classes but I seem to >> recall that there is an Rcpp class for arrays with more than 2 >> dimensions. However, I can't find anything that looks like that in >> the declarations or in the unit tests. I can easily create such an >> object by installing a dim attribute on a Vector type but I didn't >> want to reinvent the wheel. >> >> Is there such a class or am I misremembering? >> > > We do not have invented that wheel. It should not be too hard to generalize > what we do with Rcpp::Matrix > > You can ignore the member functions that have diag in their names. > > although, we would probably also have to extend the Vector::operator() for > more dimensions, and probably also Vector::offset. > > I feel somewhat lazy here, but if you or someone else decides to pick it > up, I will have a look. > > Romain > > -- > Romain Francois > Professional R Enthusiast > +33(0) 6 28 91 30 30 > http://romainfrancois.blog.free.fr > |- http://bit.ly/98Uf7u : Rcpp 0.8.1 > |- http://bit.ly/c6YnCi : graph gallery collage > `- http://bit.ly/bZ7ltC : inline 0.3.5 > > > _______________________________________________ > Rcpp-devel mailing list > [email protected] > https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel >
_______________________________________________ Rcpp-devel mailing list [email protected] https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
