mapequation / infomap

Multi-level network clustering based on the Map Equation
https://mapequation.org/infomap
GNU General Public License v3.0
425 stars 88 forks source link

fix(python): Fix physical leaf node iterator on state networks #312

Closed danieledler closed 2 years ago

danieledler commented 2 years ago

In python, iteration with im.physical_nodes sometimes skips nodes and sometimes gives seg. fault. The underlying InfomapLeafIteratorPhysical works in C++ so problem seems to be in SWIG.

As InfomapIteratorPhysical works also in python, the current solution adds a python iterator wrapper around this that skips non-leaf nodes.

danieledler commented 2 years ago

Fixes #266?