code: @Override
      public Matrix[] decompose() {
  
          Matrix[] qrr = super.decompose();
          Matrix qr = qrr[0];
          Matrix r = qrr[1];
  
          Matrix q = qr.blank();
  
          for (int k = q.columns() - 1; k >= 0; k--) {
  
              q.set(k, k, 1.0);
  
              for (int j = k; j < q.columns(); j++) {
  
                  if (Math.abs(qr.get(k, k)) > Matrices.EPS) {
  
                      double acc = 0.0;
  
                      for (int i = k; i < q.rows(); i++) {
                          acc += qr.get(i, k) * q.get(i, j);
                      }
  
                      acc = -acc / qr.get(k, k);
  
                      for (int i = k; i < q.rows(); i++) {
                          q.updateAt(i, j, Matrices.asPlusFunction(acc * qr.get(i, k)));
                      }
                  }
              }
          }
  
          for (int i = 0; i < r.rows(); i++) {
              for (int j = i + 1; j < r.columns(); j++) {
                  r.set(i, j, qr.get(i, j));
              }
          }
  
          return new Matrix[] { q, r };
      }
docs: Returns the result of QR decomposition of given matrix
  <p>
  See <a href="http://mathworld.wolfram.com/QRDecomposition.html">
  http://mathworld.wolfram.com/QRDecomposition.html</a> for more details.
  </p>
  
  @return { Q, R }