rmnldwg / lymph

Python package for statistical modelling of lymphatic metastatic spread in head & neck cancer.
https://lymph-model.readthedocs.io
MIT License
5 stars 4 forks source link

use NetworkX library #19

Closed rmnldwg closed 2 years ago

rmnldwg commented 2 years ago

Just found out that there's a library for generating and analysing graph structures out there. It's called NetworkX and it might make parts of my code more readable and/or performant, so I should look into this... But on the other hand it might mean rewriting large parts of the code base....

rmnldwg commented 2 years ago

After checking it out, as well as the library igraph which I even used to implement a version of my code, I ditched it again, because the speed benefit arises in places and for algorithms that I don't use. So, sticking with my lightweight, self-made graph implementation is enough. And through the somewhat clever use of caching, I managed to speed everything up by a factor of 2x or 3x.