waynebhayes / SANA

Simulating Annealing Network Aligner
25 stars 40 forks source link

fixed importance bug #140

Closed wangpatrick57 closed 3 years ago

wangpatrick57 commented 3 years ago

Hey Nil,

I'm currently a student doing research under Dr. Hayes, and I had to migrate the SANA C++ code for calculating Importance to C code in BLANT. While doing that, I found that the two implementations weren't giving the same results, and that led me to find an error in this implementation. In your code, you only set half of the edgeWeights to 1 at the beginning or increment half of them later on. This would work if edgeWeights were an upper or lower triangular matrix, but it's not, because sometimes edge[0] > edge[1] and sometimes edge[1] > edge[0], and same for v1 and v2. After making these changes in the SANA code, I was able to get consistent importance values between SANA and BLANT.

Best, Patrick