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

Søren Højsgaard sorenh at math.aau.dk
Sun Jun 24 20:10:46 CEST 2012


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:lawyer at mpi-inf.mpg.de]
Sent: 24. juni 2012 19:56
To: Søren Højsgaard
Cc: rcpp-devel at lists.r-forge.r-project.org (rcpp-devel at r-forge.wu-wien.ac.at)
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

Rcpp-devel at lists.r-forge.r-project.org<mailto: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/bb3eef12/attachment.html>


More information about the Rcpp-devel mailing list