[Rcpp-devel] Using sparse matrices from the Matrix package in Rcpp

Glenn Lawyer lawyer at mpi-inf.mpg.de
Sun Jun 24 19:56:18 CEST 2012


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
> Rcpp-devel at lists.r-forge.r-project.org
> 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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20120624/863bbc24/attachment.html>


More information about the Rcpp-devel mailing list