#include "sources/utils/algebra.h" #include #include // small useful function to transform a matrix as given by R // into a easier-to-handle one. double* transpose(double* M, int nrow, int ncol) { double* Mtr = (double*)malloc(nrow*ncol*sizeof(double)); for (int i=0; i