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.
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