@@ -0,0 +1,2652 @@
+/*%0D%0A * The MIT License%0D%0A *%0D%0A * Copyright 2016 Y.K. Chan.%0D%0A *%0D%0A * Permission is hereby granted, free of charge, to any person obtaining a copy%0D%0A * of this software and associated documentation files (the %22Software%22), to deal%0D%0A * in the Software without restriction, including without limitation the rights%0D%0A * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell%0D%0A * copies of the Software, and to permit persons to whom the Software is%0D%0A * furnished to do so, subject to the following conditions:%0D%0A *%0D%0A * The above copyright notice and this permission notice shall be included in%0D%0A * all copies or substantial portions of the Software.%0D%0A *%0D%0A * THE SOFTWARE IS PROVIDED %22AS IS%22, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR%0D%0A * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,%0D%0A * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE%0D%0A * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER%0D%0A * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,%0D%0A * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN%0D%0A * THE SOFTWARE.%0D%0A */%0D%0Apackage jacobi.core.decomp.qr;%0D%0A%0D%0Aimport jacobi.api.Matrix;%0D%0Aimport jacobi.core.decomp.qr.step.QRStep;%0D%0Aimport jacobi.test.annotations.JacobiEquals;%0D%0Aimport jacobi.test.annotations.JacobiImport;%0D%0Aimport jacobi.test.annotations.JacobiInject;%0D%0Aimport jacobi.test.annotations.JacobiResult;%0D%0Aimport jacobi.test.util.Jacobi;%0D%0Aimport jacobi.test.util.JacobiJUnit4ClassRunner;%0D%0Aimport java.util.Map;%0D%0Aimport java.util.concurrent.atomic.AtomicInteger;%0D%0Aimport org.junit.Test;%0D%0Aimport org.junit.runner.RunWith;%0D%0A%0D%0A/**%0D%0A *%0D%0A * @author Y.K. Chan%0D%0A */%0D%0A@JacobiImport(%22/jacobi/test/data/FullQRTest.xlsx%22)%0D%0A@RunWith(JacobiJUnit4ClassRunner.class)%0D%0Apublic class FullQRTest %7B%0D%0A    %0D%0A    @JacobiInject(-1)%0D%0A    public Map%3CInteger, Matrix%3E steps;%0D%0A    %0D%0A    @JacobiResult(100)%0D%0A    public Matrix result;%0D%0A    %0D%0A    @Test%0D%0A    @JacobiImport(%22Full 4x4%22)%0D%0A    @JacobiEquals(expected = 100, actual = 100)%0D%0A    public void test4x4() %7B%0D%0A        Matrix input = this.steps.get(0);%0D%0A        this.mock().compute(input, null, true);%0D%0A        this.result = input;%0D%0A    %7D%0D%0A    %0D%0A    protected FullQR mock() %7B%0D%0A        AtomicInteger count = new AtomicInteger(0);%0D%0A        QRStep step = new FullQR().getStep();%0D%0A        return new FullQR((m, p, begin, end, full) -%3E %7B%0D%0A            int k = count.incrementAndGet(); %0D%0A            if(steps.containsKey(k))%7B                %0D%0A                Jacobi.assertEquals(steps.get(k), m);%0D%0A            %7D%0D%0A            step.compute(m, p, begin, end, full);%0D%0A            %0D%0A        %7D);%0D%0A    %7D%0D%0A%7D%0D%0A

Add switch to single shift when first column / last row almost deflated