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

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.7
    • 0.7, 0.8
    • classic

    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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            smarthi Suneel Marthi
            maysamyabandeh Maysam Yabandeh
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment