Hi Bruno, thanks for a useful tool. It comes in handy for efficiently summing sparse tensors together. On my system there appears to be a bug when one of the two arrays is empty (see example case below). Is this a compilation problem on my system or a bug in the algorithm? Thanks!
Couldn't get it to run despite trying all options including the f2c. Compiles and crashes when I try to run an example. I'm running OS X 10.6, Matlab 2011a, 64 bit, with gcc 4.6.2 (prerelease) and Blas 10.2.6. Could it be that my compiler is too new? Matlab documentation says I need an older gcc, 3.2, and older gfortran, 4.3.x.
22 Aug 2012
MTRON is a Matlab wrapper for the Fortran software TRON (a large scale trust region Newton method).
Author: Christoph Ortner
I used Stephen's command verbatim to compile on 64 bit OS X (Snow Leopard). mex complained about "assignment from incompatible pointer type" in the copy_H function of mtron.c. So in addition to Son Le's modifications to mtron.c, I also had to change
in mtron.c, line 108: mwIndex *irt, *jct;
Now it seems to work great. (Bizarrely, the code occasionally worked before the line 108 modification, but was very slow.)
Incredible! I have to do a series of structured matrix-vector multiplications where the matrices have identical structure. There was no way to do this with built-in matlab functionality, outside of using a FOR loop. A MULTIPROD-based implementation turned out to be 100-1000 times faster on problems of practical size!