Question: implementation of the weighted solver
Closed this issue · 2 comments
Dear @terzakig and @mlourakis,
Thank you for open sourcing this awesome project. For my current project, I have to use your solver with weights for the points (similar to #4). When I looked into your code, I noticed that the weights are applied to both the Omega matrix and the Q matrix. Based on my understanding of the paper, I would imagine just applying the weights to the Omega matrix is enough, as we are essentially pre-multiplying each term in eq. (4)'s summation with w_i.
Looking forward to your response!
Hi there,
thank you for the interest in our work and for your comments!
Yes, weights are applied to each term, hence it would make sense that if we subsume the weight in Q, then that would give the Omega matrix that corresponds to the weighted case. And this is what is done implicitly in the code. The summation of Q * A matrices is necessary to complete the computation of Omega (see lines 200 and 202) and we take advantage of this fact in order to save computations by doing it separately. So, the weights are applied partially in W and partially in the summation of Qi * Ai, but in the end (line 202) they are all combined together in Omega.
Thank you for your response! I understand the code now.