Examples of LinearSolverChol


Examples of org.ejml.alg.dense.linsol.chol.LinearSolverChol

        DenseMatrix64F A_inv = new DenseMatrix64F(w, w);
        DenseMatrix64F A_inv_block = new DenseMatrix64F(w, w);

        CholeskyDecompositionBlock algBlock = new CholeskyDecompositionBlock(b);
        LinearSolver<DenseMatrix64F> solver = new LinearSolverChol(algBlock);
        solver = new LinearSolverSafe<DenseMatrix64F>(solver);
        assertTrue(solver.setA(A));
        solver.invert(A_inv_block);

        CholeskyDecompositionInner alg = new CholeskyDecompositionInner(true);
        solver = new LinearSolverChol(alg);
        solver = new LinearSolverSafe<DenseMatrix64F>(solver);
        assertTrue(solver.setA(A));
        solver.invert(A_inv);

        EjmlUnitTests.assertEquals(A_inv,A_inv_block,1e-5);
    }
View Full Code Here

Examples of org.ejml.alg.dense.linsol.chol.LinearSolverChol

     * @return A new solver for symmetric positive definite matrices.
     */
    public static LinearSolver<DenseMatrix64F> symmPosDef( int matrixWidth ) {
        if(matrixWidth < EjmlParameters.SWITCH_BLOCK64_CHOLESKY )  {
            CholeskyDecompositionCommon decomp = new CholeskyDecompositionInner(true);
            return new LinearSolverChol(decomp);
        } else {
            if( EjmlParameters.MEMORY == EjmlParameters.MemoryUsage.FASTER )
                return new LinearSolverCholBlock64();
            else {
                CholeskyDecompositionCommon decomp = new CholeskyDecompositionInner(true);
                return new LinearSolverChol(decomp);
            }
        }
    }
View Full Code Here

Examples of org.ejml.alg.dense.linsol.chol.LinearSolverChol

    }

    private static void runAlgorithms( DenseMatrix64F A , DenseMatrix64F b ,int numTrials )
    {
        System.out.println("Solve Cholesky         = "+solve(
                new LinearSolverChol(new CholeskyDecompositionInner(true)),
                A,b,numTrials));
        System.out.println("Solve Cholesky LDL     = "+solve(
                new LinearSolverCholLDL(new CholeskyDecompositionLDL()),
                A,b,numTrials));
    }
View Full Code Here

Examples of org.ejml.alg.dense.linsol.chol.LinearSolverChol

//        System.out.println("invert GJ No Pivot     = "+ invertGJ_NoPivot(mat,numTrials));
//        System.out.println("invert GJ               = "+ invertGJ(mat,numTrials));
//        System.out.println("invert LU-NR            = "+ invertLU_nr(mat,numTrials));
//        System.out.println("invert LU-Alt           = "+ invertLU_alt(mat,numTrials));
        System.out.println("invert Cholesky Inner       = "+ invertCholesky(
                new LinearSolverChol(new CholeskyDecompositionInner( true)),
                mat,numTrials));
        System.out.println("invert Cholesky Block Dense = "+ invertCholesky(
                new LinearSolverChol(new CholeskyDecompositionBlock( EjmlParameters.BLOCK_WIDTH_CHOL)),
                mat,numTrials));
//        System.out.println("invert default              = "+ invertCholesky(
//                LinearSolverFactory.symmetric(mat.numRows),
//                mat,numTrials));
//        System.out.println("invert CholeskyLDL          = "+ invertCholesky(
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.