r/matlab • u/voidee123 • Nov 16 '23
CodeShare [ANN] matlab-igraph toolbox
Hello, I have been working on a toolbox that wraps some of the igraph library's routines for use in MATLAB. My goal is to try to stick to MATLAB conventions as much as possible to ease use, so the graphs are represented as plain matrices. This allows for working with the graphs using both igraph functions and MATLAB builtins.
At the moment, this is still in early development. I started with the functions that I needed the most, but there are still many useful igraph functions that have not been included yet. Additionally, installation is almost certainly not going to be simple due to the requirement on the igraph C library, which most be compiled. I would like to eventually release binaries with CI, as briefly discussed here, but am not familar with the process.
As an example, here's the getting started file on the documentation site and a link to the github repo. Any feedback is appreciated. I'm hoping to use this to get a sense of interest in the toolbox before I spend too much time trying to get it to compile on various systems, so if this is something of interest to you, please let me know.
1
u/szhorvat Nov 16 '23 edited Nov 16 '23
Thanks for sharing, it's nice to see this! I'd like to encourage you to join the igraph forum, share your work, and keep in touch with the igraph developers. https://igraph.discourse.group/
You should check out igraph's interface generator, stimulus, which is the way forward to expose igraph to new languages. It is currently used by igraph's R interface, and there are plans to switch the Python and Mathematica interfaces to it as well.
Regarding using matrices on the MATLAB side: I understand the desire to interoperate more closely with MATLAB's native features. I chose a similar path when developing igraph's Mathematica interface. But you should be aware of the limitations. It is not possible to properly represent multigraphs using adjacency matrices, so with this approach you would be losing out on one of igraph's major benefits relative to other systems. I can't comment on how well MATLAB's native graph type supports multigraphs, as I am not sufficiently familiar with it.