[Rcpp-devel] Use cholmod modify module in an Rcpp / RcppEigen package

etienne.come at univ-eiffel.fr etienne.come at univ-eiffel.fr
Tue Oct 11 09:43:55 CEST 2022


Hi Dirk,

Thanks for your response. I've managed to deal with cholmod directly by copying it in my src as you suggested. This create conflicts with RcppEigen but since i was using it only to access the cholmod functionalities it will be ok for my use case.

Thanks for all,

Etienne



Etienne Côme, @comeetie
Chargé de Recherche
Université Gustave Eiffel
GRETTIA/COSYS
Tel : 01 81 66 87 18
Web : http://www.comeetie.fr

----- Mail original -----
De: "Dirk Eddelbuettel" <edd at debian.org>
À: "etienne come" <etienne.come at univ-eiffel.fr>
Cc: "rcpp-devel" <rcpp-devel at lists.r-forge.r-project.org>
Envoyé: Vendredi 7 Octobre 2022 00:21:46
Objet: Re: [Rcpp-devel] Use cholmod modify module in an Rcpp / RcppEigen	package

Salut Etienne,

Sorry for missing this email yesterday.

On 5 October 2022 at 12:35, etienne.come at univ-eiffel.fr wrote:
| I want to use the cholmod functions from the modify module https://github.com/PetterS/SuiteSparse/tree/master/CHOLMOD/Modify inside an Rcpp/RcppEigen R package. 
| 
| >From my understanding, these functions are not exposed by Rcpp or RcppEigen but RcppEigen expose a subset of cholmod functionalities via the RcppEigenCholmod header (https://github.com/RcppCore/RcppEigen/blob/master/inst/include/RcppEigenCholmod.h) and the actual sources come from the Matrix package https://github.com/cran/Matrix/tree/master/src/CHOLMOD. 

Right. All this goes back to careful work by Doug back when his hierarchical
model code predominantly relied on (Rcpp)Eigen.

| I've checked that the modify module is present in the src folder of the Matrix package https://github.com/cran/Matrix/tree/master/src/CHOLMOD/Modify but I'm lost on how to proceed in order to be able to use it. 
| Any help on the best way to achieve this will be greatly welcome. 

Well that is a different package, namely Matrix.

We have some examples of sharing / exporting code between packages.  But to a
very first approximation ... if you just want to get going, maybe make a copy
of Modify/ in your package?  Assumming, of course, there are no conflicts
with the other exported interfaces from Matrix and RcppEigen.

Best regards,  Dirk

-- 
dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org


More information about the Rcpp-devel mailing list