Package no.uib.cipr.matrix

Examples of no.uib.cipr.matrix.TridiagMatrix


    }

    @Override
    protected void createPrimary() throws Exception {
        int n = Utilities.getInt(1, max);
        A = new TridiagMatrix(n);
        Ad = Utilities.bandPopulate(A, 1, 1);
    }
View Full Code Here


        SVD svd = new SVD(A.numRows(), A.numColumns());
        assertEquals(A, svd.factor(A.copy()));
    }

    private void assertEquals(Matrix A, SVD svd) {
        TridiagMatrix S = new TridiagMatrix(svd.getS().length);
        System.arraycopy(svd.getS(), 0, S.getDiagonal(), 0, svd.getS().length);
        DenseMatrix U = svd.getU();
        DenseMatrix Vt = svd.getVt();

        // Compute U*S*Vt
        Matrix s = U.mult(S.mult(Vt, new DenseMatrix(S.numRows(), Vt
                .numColumns())), new DenseMatrix(A.numRows(), A.numColumns()));

        // Check that A=U*S*Vt
        for (int i = 0; i < A.numRows(); ++i)
            for (int j = 0; j < A.numColumns(); ++j)
View Full Code Here

TOP

Related Classes of no.uib.cipr.matrix.TridiagMatrix

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.