Registered Member
|
Hello,
I'm using the sparse matrix code and have the following issue. I was following the documentation example for how to fill a sparse matrix in 'coherence order', which looks like this:
When I tried this in my program, upon the second call to insertBack(), I hit the first assert(). The interface to insertBack goes as:
which is different from that of insert:
Note that insertBack() uses (outer, inner) while insert() uses (row, col). I think this is the point of confusion. Because of this discrepancy, the pseudocode in the documentation for filling in 'coherence order' looks totally fine for the normal convention of matrix addressing, but for a column-major matrix, the arguments passed are swapped! Is the issue the documentation or the interface? Cheers, Leo |
Moderator
|
thanks for noticing that. I think it is both! Finally it looks dangerous to have insert and insertBack using different conventions for the arguments, so I'm going to make them consistent with (row,col), and add a insertBackByOiterInner as we now have in the dense module.
|
Registered Member
|
Gael,
Thanks for taking the time to work on this! However, there is now a bug in that insertBack() calls insertBackByInnerOuter() which looks like a typo for insertBackByOuterInner(). Cheers Leo |
Moderator
|
oops thanks a lot !
have to improve the unit tests ! |
Registered users: Bing [Bot], Google [Bot], Sogou [Bot]