code: public double[] getRow(int row) {
          checkIndices(row, 0);
  
          double[] rowArr = new double[cols];
          int index = getIndex(row, 0);
          for (int i = 0; i < cols; ++i)
              rowArr[i] = matrix[index++];
          return rowArr;
      }
docs: {@inheritDoc}