public QR qr() {
        return qr(false);
    }
@Test
    public void testQR() {
        System.out.println("QR");
        double[][] A = {
                {0.9000, 0.4000, 0.7000f},
                {0.4000, 0.5000, 0.3000f},
                {0.7000, 0.3000, 0.8000f}
        };

        double[] b = {0.5, 0.5, 0.5f};
        double[] x = {-0.2027027, 0.8783784, 0.4729730f};

        BigMatrix a = BigMatrix.of(A);
        BigMatrix.QR qr = a.qr();
        double[] x2 = qr.solve(b);
        assertEquals(x.length, x2.length);
        for (int i = 0; i < x.length; i++) {
            assertEquals(x[i], x2[i], 1E-7);
        }

        double[][] B = {
                {0.5, 0.2f},
                {0.5, 0.8f},
                {0.5, 0.3f}
        };
        double[][] X = {
                {-0.2027027, -1.2837838f},
                { 0.8783784,  2.2297297f},
                { 0.4729730,  0.6621622f}
        };

        BigMatrix X2 = BigMatrix.of(B);
        qr.solve(X2);
        for (int i = 0; i < X.length; i++) {
            for (int j = 0; j < X[i].length; j++) {
                assertEquals(X[i][j], X2.get(i, j), 1E-7);
            }
        }
    }