code: public void addRow(DMatrixRMaj Q , DMatrixRMaj R , double []row , int rowIndex , boolean resizeR ) {
          // memory management and check precoditions
          setQR(Q,R,1);
          m_m = m+1;
  
          if( Q.data.length < m_m*m_m )
              throw new IllegalArgumentException("Q matrix does not have enough data to grow");
  
          if( resizeR && R.data.length < m_m*n )
              throw new IllegalArgumentException("R matrix does not have enough data to grow");
  
          if( resizeR )
              R.reshape(m_m,n, false);
  
          U_tran.reshape(m_m,m_m, false);
  
          // apply givens rotation to the first two rows of the augmented R matrix
          applyFirstGivens(row);
          applyLaterGivens();
          // compute new Q matrix
          updateInsertQ(rowIndex);
  
          // discard the reference since it is no longer needed
          this.Q = this.R = null;
      }
docs: <p>
  Adjusts the values of the Q and R matrices to take in account the effects of inserting
  a row to the 'A' matrix at the specified location.  This operation requires about 6mn + O(n) flops.
  </p>
  
  <p>
  If Q and/or R does not have enough data elements to grow then an exception is thrown.
  </p>
  
  <p>
  The adjustment done is by computing a series of planar Givens rotations that make the adjusted R
  matrix upper triangular again.  This is then used to modify the Q matrix.
  </p>
  
  @param Q The Q matrix which is to be modified, must be big enough to grow.  Must be n by n..  Is modified.
  @param R The R matrix which is to be modified, must be big enough to grow.  Must be m by n.  Is modified.
  @param row The row being inserted.  Not modified.
  @param rowIndex Which row index it is to be inserted at.
  @param resizeR Should the number of rows in R be changed?  The additional rows are all zero.