code: public void setRow(int row, double[] columns) {
          checkIndices(row, columns.length - 1);
  
          if (cols <= columns.length)
              cols = columns.length;
          
          SparseDoubleVector rowVec = updateRow(row);
  
          for (int col = 0; col < cols; ++col) {
              double val = columns[col];
              rowVec.set(col, val);
          }
      }
docs: {@inheritDoc}
  
  The size of the matrix will be expanded if either row or
  col is larger than the largest previously seen row or column value.
  When the matrix is expanded by either dimension, the values for the new
  row/column will all be assumed to be zero.