Closed ctralie closed 7 years ago
Also, I used a convention that classes which don't die are recorded with a death time of the diameter of the distance function, so that those classes are recorded and returned. That was the most sensible thing I could think of.
Hi Uli, Jose Perea and I are running a course at ICERM for undergrads on topological time series analysis, and they only know Matlab. So I added a mex entry point for Ripser, along with a small API in matlab for calling it and plotting persistence diagrams. I tried to follow your conventions of using #define statements, so your code will compile normally and is unaffected unless it is actually being called from a mex compiler. I ended up copying some of your calling code which could possibly be duplicated in a function (so the mex entry point is similar to the main function, with some alterations), but this kept things compartmentalized for now.
You can build and test it as follows: Open up matlab at the root of the ripser directory, and type
makeRipser
This should built the ripser files. I have also departed slightly from convention and included mex binaries for 64 bit Ubuntu, Windows, and Mac, to possibly sidestep compilation for people who may have trouble with it.
3) To test the Matlab wrapper, go into the examples folder, and type RP2Example
You should see a plot like the one I've attached here.
Let me know if you have any questions! Best, Chris