Thanks, Will look at the RcppEigen package. For other purposes I already use the RBGL package which interfaces the boost graph library. However, the interface goes via S4 type methods - so everything is slow... ;)
Regards Søren From: Glenn Lawyer [mailto:[email protected]] Sent: 24. juni 2012 19:56 To: Søren Højsgaard Cc: [email protected] ([email protected]) Subject: Re: [Rcpp-devel] Using sparse matrices from the Matrix package in Rcpp I would suggest using the eigen library, Rccp has an interface to this. Alternately, you could link to the boost graph library. +glenn On 06/24/2012 06:12 PM, Søren Højsgaard wrote: Dear list I have code for graph operations where I represent graphs as adjacency matrices (matrices with 0's and 1's). When graphs grow large storing all the 0's becomes uneconomical, so I want to use sparse matrices (from the Matrix package) for large graphs instead. Simple indexing operations like M[i,j] however are very slow, so I wonder if there are ways of dealing with sparse matrices (and rapid indexing) in the Rcpp framework. Apologies if I have overlooked posts on this topic. Regards Søren _______________________________________________ Rcpp-devel mailing list [email protected]<mailto:[email protected]> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel -- ----------------------------------- It is difficult to find a black cat in a dark room, especially if there is no cat. -- Chinese proverb Dr. Glenn Lawyer +352 661 967 244 Max-Planck-Institut für Informatik Computational Biology and Applied Algorithmics Campus E1 4 66123 Saarbrücken, Germany http://bioinf.mpi-inf.mpg.de/~lawyer
_______________________________________________ Rcpp-devel mailing list [email protected] https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
