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

SparseMatrix.viewRow is sometimes readonly

    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

        1. MAHOUT-1221.patch
          1 kB
          Maysam Yabandeh
        2. MAHOUT-1221.patch
          1 kB
          Maysam Yabandeh

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: