Package org.ejml.alg.dense.decomposition.lu

Examples of org.ejml.alg.dense.decomposition.lu.LUDecompositionAlt.decompose()


        for( int N = 2; N <= UnrolledDeterminantFromMinor.MAX; N++ ) {
            DenseMatrix64F A = RandomMatrices.createRandom(N,N,rand);

            double unrolled = UnrolledDeterminantFromMinor.det(A);
            LUDecompositionAlt alg = new LUDecompositionAlt();
            assertTrue( alg.decompose(A) );
            double expected = alg.computeDeterminant();

            assertEquals(expected,unrolled,1e-8);
        }
    }
View Full Code Here


        for( int width = 5; width < 12; width++ ) {
            DenseMatrix64F A = RandomMatrices.createRandom(width,width,rand);

            LUDecompositionAlt lu = new LUDecompositionAlt();
            lu.decompose(A);

            double luVal = lu.computeDeterminant();

            DeterminantFromMinor minor = new DeterminantFromMinor(width);
            double minorVal = minor.compute(new DenseMatrix64F(width,width, true, A.data));
View Full Code Here

            } else {
                return mat.get(0);
            }
        } else {
            LUDecompositionAlt alg = new LUDecompositionAlt();
            if( !alg.decompose(mat) )
                return 0.0;
            return alg.computeDeterminant();
        }
    }
View Full Code Here

        LUDecompositionAlt alg = new LUDecompositionAlt();

        double total = 0;

        for( int i = 0; i < numTrials; i++ ) {
            alg.decompose(mat);
            total += alg.computeDeterminant();
        }

//        System.out.println("   total = "+total);
        long after = System.currentTimeMillis();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.