code: public RowVector getRow(int r) throws MatrixException
      {
          if ((r < 0) || (r >= nRows)) {
              throw new MatrixException(MatrixException.INVALID_INDEX);
          }
  
          RowVector rv = new RowVector(nCols);
          for (int c = 0; c < nCols; ++c) {
              rv.values[0][c] = this.values[r][c];
          }
  
          return rv;
      }
docs: Get a row of this matrix.
  @param r the row index
  @return the row as a row vector
  @throws numbercruncher.MatrixException for an invalid index