Examples of IEigenResult


Examples of mikera.matrixx.decompose.IEigenResult

    @Test(expected = UnsupportedOperationException.class)
    public void vectorsNotComputed() {
        Matrix A = Matrix.create(new double[][] {{1,2,3},
                                                 {2,5,6},
                                                 {3,6,9}});
        IEigenResult result = Eigen.decomposeSymmetric(A, false);
        result.getEigenVectors();
    }
View Full Code Here

Examples of mikera.matrixx.decompose.IEigenResult

    @Test
    public void test1() {
        Matrix A = Matrix.create(new double[][] {{1,2,3},
                                                 {2,5,6},
                                                 {3,6,9}});
        IEigenResult result = Eigen.decomposeSymmetric(A);   
        Vector2[] eigenValues = new Vector2[3];
        eigenValues = result.getEigenvalues();
        AVector[] eigenVectors = new AVector[3];
        eigenVectors = result.getEigenVectors();
        assertTrue(eigenValues[0].epsilonEquals(Vector2.of(14.300735254, 0), 1e-8));
        assertTrue(eigenValues[1].epsilonEquals(Vector2.of(0, 0), 1e-8));
        assertTrue(eigenValues[2].epsilonEquals(Vector2.of(0.699264746, 0), 1e-8));
        assertTrue(eigenVectors[0].epsilonEquals(Vector.of(-0.261496397, -0.562313386, -0.784489190), 1e-8));
        assertTrue(eigenVectors[1].epsilonEquals(Vector.of(-0.948683298, 0, 0.316227766), 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.