Added some iterating methods to Matrix (issue #57)#79
Added some iterating methods to Matrix (issue #57)#79vkostyukov merged 18 commits intovkostyukov:masterfrom SamoylovMD:master
Conversation
|
Test are failed, since there is a usage if |
There was a problem hiding this comment.
This is not a good idea. The getRow is extreamally slow method. We need to iterate in straightforward way. Like:
for (int j = 0; j < columns; j++) {
procedure.apply(i, j, get(i, j));
}|
Hi Maxim @SamoylovMD, Please also add Please, also follow my coments to improve the code. |
There was a problem hiding this comment.
I don't think this is correct. We need a separate implementation for non-zero elements here.
There was a problem hiding this comment.
Ofc, my error. Will rewrite in few seconds.
There was a problem hiding this comment.
Fixed in new commit.
There was a problem hiding this comment.
I would prefere to have spaces here. Like
procedure.apply(i, j, get(i, j));
Added: each, eachInRow, eachInColumn methods;
Renamed each method to eachNonZero.