In fact, while Optimiser.py states that this value defaults to True, it is often 0.
I've also seen consider_empty_communities evaluate to 32732 and 1081192448 (among many other "True" values), depending on whatever happened to reside in memory at the time.
A fix is to simply set this->consider_empty_community = true; in the Optimiser constructor (if defaulting to True is indeed intended).
For what it's worth, the valgrind error that initially alerted us to this problem (while writing #34) is as follows:
Optimiser::consider_empty_communities is never initialized (unless Optimiser.consider_empty_community is explicitly set from Python).
Hence, the if statement on line 402 of Optimiser.cpp is undefined behavior.
In fact, while Optimiser.py states that this value defaults to True, it is often 0.
I've also seen consider_empty_communities evaluate to 32732 and 1081192448 (among many other "True" values), depending on whatever happened to reside in memory at the time.
A fix is to simply set
this->consider_empty_community = true;
in the Optimiser constructor (if defaulting to True is indeed intended).For what it's worth, the valgrind error that initially alerted us to this problem (while writing #34) is as follows: