Examples of DenseMatrix64F


Examples of org.ejml.data.DenseMatrix64F

//        long pointC = System.currentTimeMillis();

//        System.out.println("  bidiag UV "+(pointB-pointA)+" qr UV "+(pointC-pointB));

        if( transposed ) {
            DenseMatrix64F temp = Vt;
            Vt = Ut;
            Ut = temp;
        }
        return false;
    }
View Full Code Here

Examples of org.ejml.data.DenseMatrix64F

    @Test
    public void constructor_1d_array() {
        double d[] = new double[]{2,5,3,9,-2,6,7,4};
        SimpleMatrix s = new SimpleMatrix(3,2, true, d);
        DenseMatrix64F m = new DenseMatrix64F(3,2, true, d);

        EjmlUnitTests.assertEquals(m,s.getMatrix(),1e-8);
    }
View Full Code Here

Examples of org.ejml.data.DenseMatrix64F

    @Test
    public void constructor_2d_array() {
        double d[][] = new double[][]{{1,2},{3,4},{5,6}};

        SimpleMatrix s = new SimpleMatrix(d);
        DenseMatrix64F mat = new DenseMatrix64F(d);

        EjmlUnitTests.assertEquals(mat,s.getMatrix(),1e-8);
    }
View Full Code Here

Examples of org.ejml.data.DenseMatrix64F

        EjmlUnitTests.assertEquals(mat,s.getMatrix(),1e-8);
    }

    @Test
    public void constructor_dense() {
        DenseMatrix64F mat = RandomMatrices.createRandom(3,2,rand);
        SimpleMatrix s = new SimpleMatrix(mat);

        assertTrue( mat != s.getMatrix() );
        EjmlUnitTests.assertEquals(mat,s.getMatrix(),1e-8);
    }
View Full Code Here

Examples of org.ejml.data.DenseMatrix64F

    /**
     * Performs a decomposition and makes sure the input matrix is not modified.
     */
    public static boolean safeDecomposition( DecompositionInterface decomp , DenseMatrix64F A ) {

        DenseMatrix64F A_orig = decomp.inputModified() ? A.copy() : A;

        return decomp.decompose(A_orig);
    }
View Full Code Here

Examples of org.ejml.data.DenseMatrix64F

        EjmlUnitTests.assertEquals(orig.mat,copy.mat,1e-8);
    }

    @Test
    public void wrap() {
        DenseMatrix64F mat = RandomMatrices.createRandom(3,2,rand);

        SimpleMatrix s = SimpleMatrix.wrap(mat);

        assertTrue(s.mat == mat);
    }
View Full Code Here

Examples of org.ejml.data.DenseMatrix64F

    @Test
    public void identity() {
        SimpleMatrix s = SimpleMatrix.identity(3);

        DenseMatrix64F d = CommonOps.identity(3);

        EjmlUnitTests.assertEquals(d,s.mat,1e-8);
    }
View Full Code Here

Examples of org.ejml.data.DenseMatrix64F

     * flag.
     *
     * @param decomp
     */
    public static void checkModifiedInput( DecompositionInterface decomp ) {
        DenseMatrix64F A = RandomMatrices.createSymmPosDef(4,new Random(0x434));
        DenseMatrix64F A_orig = A.copy();

        assertTrue(decomp.decompose(A));

        boolean modified = !MatrixFeatures.isEquals(A,A_orig);

View Full Code Here

Examples of org.ejml.data.DenseMatrix64F

    {
        Random rand = new Random(0xfff);

        int width = 10;

        DenseMatrix64F A = RandomMatrices.createRandom(width,width,rand);

        DeterminantFromMinor minor = new DeterminantFromMinor(width);
        double minorVal = minor.compute(A);

        LUDecompositionAlt alg = new LUDecompositionAlt();
View Full Code Here

Examples of org.ejml.data.DenseMatrix64F

    @Test
    public void transpose() {
        SimpleMatrix orig = SimpleMatrix.random(3,2, 0, 1, rand);
        SimpleMatrix tran = orig.transpose();

        DenseMatrix64F dTran = new DenseMatrix64F(2,3);
        CommonOps.transpose(orig.mat,dTran);

        EjmlUnitTests.assertEquals(dTran,tran.mat,1e-8);
    }
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.