Uploaded image for project: 'Mahout'
  1. Mahout
  2. MAHOUT-1221

SparseMatrix.viewRow is sometimes readonly

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.7
    • Fix Version/s: 0.7, 0.8
    • Component/s: Math
    • Labels:

      Description

      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.

      if (res == null) {
      res = newRandomAccessSparceVector(columnSize());
      //now the row must be added by assignRow(row, res);
      }
      return res;
      

      An example in which this bug manifests is the following:

      QRDecomposition.java
      x.viewRow(k).assign(y.viewRow(k), Functions.plusMult(1 / r.get(k, k)));
      

      where Matrix x is not updated if it is an instance of SparseMatrix.

        Attachments

          Activity

            People

            • Assignee:
              smarthi Suneel Marthi
              Reporter:
              maysamyabandeh Maysam Yabandeh

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment