code: public void setRow(int row, DoubleVector colValues) {
          checkIndices(row, colValues.length(), true);
          int c = cols.get();
          lockRow(row, c);
          boolean modified = false;
          for (int col = 0; col < c; ++col) {
              double val = colValues.get(col);
              Entry e = new Entry(row, col);
              boolean present = matrixEntries.containsKey(e);
              if (val != 0) {
                  matrixEntries.put(e, val);
                  // Only invalidate the cache if the number of rows or columns
                  // containing data has changed
                  modified = modified || !present;
              }
              else if (present) {
                  matrixEntries.remove(e);
                  modified = true;
              }
          }
          if (modified)
              modifications.incrementAndGet();
          unlockRow(row, c);
      }
docs: {@inheritDoc}