taynaud / python-louvain

Louvain Community Detection
BSD 3-Clause "New" or "Revised" License
965 stars 200 forks source link

why isn't the resolution used in `__modularity(status)`? #47

Closed alexbovet closed 4 years ago

alexbovet commented 5 years ago

Hi,

I suspect that there is a bug when the resolution is different than 1.0, but I might have missed something in the implementation.

Shouldn't the function __modularity() use the resolution parameter when computing the modularity? Especially since it is used to break the loop in __one_level() :

        new_mod = __modularity(status)
        if new_mod - cur_mod < __MIN:
            break