Package mikera.matrixx.decompose

Examples of mikera.matrixx.decompose.IBidiagonalResult


            assertEquals(off[i],A_found.get(i,i+1),1e-8);
        }
    }

    public static SvdImplicitQrAlgorithm createHelper( Matrix a ) {
      IBidiagonalResult ans = BidiagonalRow.decompose(a.copy());
        assertNotNull(ans);
        double diag[] = new double[a.rowCount()];
        double off[] = new double[ diag.length-1 ];
        diag = ans.getB().getBand(0).toDoubleArray();
        off = ans.getB().getBand(1).toDoubleArray();

        return createHelper(a.rowCount() ,a.columnCount() ,diag,off);
    }
View Full Code Here


        for( int i = 0; i < 10; i++ ) {
            for( int N = 2;  N <= 10; N++ ) {
                for( int tall = 0; tall <= 2; tall++ ) {
                    Matrix A = Matrix.createRandom(N+tall,N);
                   
                    IBidiagonalResult ans = BidiagonalRow.decompose(A);
                    assertNotNull(ans);
                    checkGeneric(A, ans);
                   
                    IBidiagonalResult ansCompact = BidiagonalRow.decompose(A, true);
                    assertNotNull(ansCompact);
                    checkGenericCompact(A, ansCompact);
                }
                for( int wide = 1; wide <= 2; wide++ ) {
                    Matrix A = Matrix.createRandom(N,N+wide);
                   
                    IBidiagonalResult ans = BidiagonalRow.decompose(A);
                    assertNotNull(ans);
                    checkGeneric(A, ans);
                   
                    IBidiagonalResult ansCompact = BidiagonalRow.decompose(A, true);
                    assertNotNull(ansCompact);
                    checkGenericCompact(A, ansCompact);
                }
            }
        }
View Full Code Here

    @Test
    public void testIdentity() {
        Matrix A = Matrix.createIdentity(5);

        IBidiagonalResult ans = BidiagonalRow.decompose(A);
        assertNotNull(ans);
        checkGeneric(A, ans);
       
        IBidiagonalResult ansCompact = BidiagonalRow.decompose(A, true);
        assertNotNull(ansCompact);
        checkGenericCompact(A, ansCompact);
       
    }
View Full Code Here

    @Test
    public void testZero() {
        Matrix A = Matrix.create(5,5);

        IBidiagonalResult ans = BidiagonalRow.decompose(A);
        assertNotNull(ans);
        checkGeneric(A, ans);
       
        IBidiagonalResult ansCompact = BidiagonalRow.decompose(A, true);
        assertNotNull(ansCompact);
        checkGenericCompact(A, ansCompact);
    }
View Full Code Here

TOP

Related Classes of mikera.matrixx.decompose.IBidiagonalResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.