Dear community Dr. Eddelbuettel suggested me to ask here.
I am trying to implement *Dulmage-Mendelsohn decomposition* in R. CSparse already has a function to do this, and it's not exported in Matrix so I took the C files and tried to use them in R. I decided to sketch this into an R Package with Rcpp: https://github.com/pachamaltese/dulmagemendelsohn The final goal is to find a permutation matrix, so that the original matrix is rearranged into a block diagonal matrix: matrix_input <- matrix( c(0,0,7,0,0, 0,0,0,0,3, 5,0,0,1,0, 0,0,2,0,0, 0,1,0,0,0), ncol = 5, nrow = 5 ) dm_decomposition <- function(matrix_input) { # the actual decomposition happens here # ... "MAGIC" ... # but here is an example output matrix( c(0,7,0,0,0, 5,0,1,0,0, 0,2,0,0,0, 0,0,0,0,3, 0,0,0,1,0), ncol = 5, nrow = 5 ) } dm_decomposition(matrix_input) Can you please provide me some guidance to get this working? I am by no means a C/C++ expert, I just have experience with statistics and writing R packages. ————— *Mauricio Vargas Sepúlveda 帕夏* Do you like Data Science? visit pacha.hk 你爱科学数据专吗?你走pacha.hk
_______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel