code: protected void convertToColumnMajor(ZMatrixRMaj A) {
          for( int x = 0; x < numCols; x++ ) {
              double colQ[] = dataQR[x];
              int indexCol = 0;
              for( int y = 0; y < numRows; y++ ) {
                  int index = (y*numCols+x)*2;
                  colQ[indexCol++] = A.data[index];
                  colQ[indexCol++] = A.data[index+1];
              }
          }
      }
docs: Converts the standard row-major matrix into a column-major vector
  that is advantageous for this problem.
  
  @param A original matrix that is to be decomposed.