code: public double[] getRow(int row) {
      double[] rowArray = new double[getColumnCount()];
      for (int i = 0; i < getColumnCount(); i++) {
        rowArray[i] = get(row, i);
      }
      return rowArray;
    }
docs: Get a single row of the matrix as a double array.