Hi Romain Doug,
Two points to note:
(1)
When poking around internal Armadillo pointers and arrays for sparse
matrices, please take into account that the col_ptrs array is slightly
longer than specified by the Compressed Sparse Column (CSC) format.
However, this should not cause any problems
Thanks for the valuable information.
I will look into it more seriously at some point when I have some more
time.
Romain
Le 09/12/12 14:40, c s a écrit :
Hi Romain Doug,
Two points to note:
(1)
When poking around internal Armadillo pointers and arrays for sparse
matrices, please take
Dear all,
I want to use a matrix (of type dgCMatrix from the Matrix package) in
RcppArmadillo, so I do:
library(inline)
src - '
using namespace arma;
using namespace Rcpp;
SpMatdouble X = asSpMatdouble (XX_);
'
foo - cxxfunction(signature(XX_=), body=src, plugin=RcppArmadillo)
- but this
Le 08/12/12 09:45, Søren Højsgaard a écrit :
Dear all,
I want to use a matrix (of type dgCMatrix from the Matrix package) in
RcppArmadillo, so I do:
library(inline)
src - '
using namespace arma;
using namespace Rcpp;
SpMatdouble X = asSpMatdouble (XX_);
'
foo - cxxfunction(signature(XX_=),
That looks very similar, if not identical to what dgCMatrix uses. Can
you direct me to a constructor where I could feed such information ?
Romain
Le 08/12/12 17:35, c s a écrit :
Armadillo sparse matrices are stored in Compressed Sparse Column format:
Ah. One thing I could do is leverage this:
#ifdef ARMA_EXTRA_SPMAT_PROTO
#include ARMA_INCFILE_WRAP(ARMA_EXTRA_SPMAT_PROTO)
#endif
Not sure how yet.
Le 08/12/12 19:17, Romain Francois a écrit :
That looks very similar, if not identical to what dgCMatrix uses. Can
you direct me to a
On Sat, Dec 8, 2012 at 10:35 AM, c s conradsand.a...@gmail.com wrote:
Armadillo sparse matrices are stored in Compressed Sparse Column format:
http://en.wikipedia.org/wiki/Sparse_matrix#Compressed_sparse_column_.28CSC_or_CCS.29
This layout is used by a majority of external solvers.
It
Le 08/12/12 19:54, Douglas Bates a écrit :
On Sat, Dec 8, 2012 at 10:35 AM, c s conradsand.a...@gmail.com
mailto:conradsand.a...@gmail.com wrote:
Armadillo sparse matrices are stored in Compressed Sparse Column format: