sararselitsky / FastPG

Fast phenograph, CyTOF
Other
25 stars 6 forks source link

Fix infinite loop #22

Open tom-b opened 2 years ago

tom-b commented 2 years ago

An error came about when the grappolo code identified vertices that needed "fixing". This walked through the process of creating a new graph. A C++ templated map object involved used a long datatype for what is a double datatype for the weight. This resulted in all the edge weights being zero. Downstream from that, grappolo has bits of code that divide by the total edge weight of the graph when determining the current modularity. But this operation resulted in the current modularity value being a nan or inf in the C++. At that point, the current modularity is used in a comparison to find a stopping point but all evaluations went to nan or inf, so the stopping point condition check was never true.