code: private void setQR(DMatrixRMaj Q , DMatrixRMaj R , int growRows ) {
          if( Q.numRows != Q.numCols ) {
              throw new IllegalArgumentException("Q should be square.");
          }
  
          this.Q = Q;
          this.R = R;
  
          m = Q.numRows;
          n = R.numCols;
  
          if( m+growRows > maxRows || n > maxCols ) {
              if( autoGrow ) {
                  declareInternalData(m+growRows,n);
              } else {
                  throw new IllegalArgumentException("Autogrow has been set to false and the maximum number of rows" +
                          " or columns has been exceeded.");
              }
          }
      }
docs: Provides the results of a QR decomposition.  These will be modified by adding or removing
  rows from the original 'A' matrix.
  
  @param Q The Q matrix which is to be modified.  Is modified later and reference saved.
  @param R The R matrix which is to be modified.  Is modified later and reference saved.