code: public void setRow(int row, double[] columns) {
          if (columns.length != cols) {
              throw new IllegalArgumentException(
                  "invalid number of columns: " + columns.length);
          }
          for (int col = 0; col < cols; ++col) {
              sparseMatrix[row].set(col, columns[col]);
          }
      }
docs: {@inheritDoc}