[
https://issues.apache.org/jira/browse/MAHOUT-1221?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Suneel Marthi reassigned MAHOUT-1221:
-------------------------------------
Assignee: Suneel Marthi
> 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
> Assignee: Suneel Marthi
> Priority: Minor
> Labels: patch
> Fix For: 0.7, 0.8
>
> Attachments: MAHOUT-1221.patch, MAHOUT-1221.patch
>
>
> 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