[ 
https://issues.apache.org/jira/browse/MAHOUT-1221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13661764#comment-13661764
 ] 

Suneel Marthi commented on MAHOUT-1221:
---------------------------------------

Would you like to submit a patch?
                
> SparseMatrix.viewRow is sometimes readonly
> ------------------------------------------
>
>                 Key: MAHOUT-1221
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-1221
>             Project: Mahout
>          Issue Type: Bug
>          Components: Math
>    Affects Versions: 0.7
>            Reporter: Maysam Yabandeh
>            Priority: Minor
>             Fix For: 0.7, 0.8
>
>
> The implementation returns a new vector if it already does not exist. But it 
> does not add the new vector to the matrix. So, the later changes will not be 
> reflected in the matrix.
> {code:java}
> if (res == null) {
> res = newRandomAccessSparceVector(columnSize());
> //now the row must be added by assignRow(row, res);
> }
> return res;
> {code}
> An example in which this bug manifests is the following:
> {code:title=QRDecomposition.java}
> x.viewRow(k).assign(y.viewRow(k), Functions.plusMult(1 / r.get(k, k)));
> {code}
> where Matrix x is not updated if it is an instance of SparseMatrix.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to