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

Søren Højsgaard sorenh at math.aau.dk
Sun Jun 24 18:12:28 CEST 2012


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


More information about the Rcpp-devel mailing list