Package de.timefinder.algo.graph

Examples of de.timefinder.algo.graph.UndirectedEdge


        System.out.println("equals");
        int x = 3;
        int y = 4;
        float weight = 5.6f;

        UndirectedEdge instance = new UndirectedEdge(x, y, weight);
        UndirectedEdge instance2 = new UndirectedEdge(x, y, weight);
        assertEquals(instance2, instance);

        assertEquals(instance, new UndirectedEdge(x, y, weight));

        assertFalse(instance.equals(new UndirectedEdge(6, 6, weight)));
    }
View Full Code Here


        System.out.println("hashCode");
        int x = 3;
        int y = 4;
        float weight = 5.6f;

        UndirectedEdge instance = new UndirectedEdge(x, y, weight);
        UndirectedEdge instance2 = new UndirectedEdge(x, y, weight);
        assertEquals(instance2.hashCode(), instance.hashCode());

        assertEquals(instance.hashCode(), new UndirectedEdge(x, y, weight).hashCode());

        assertFalse(instance.hashCode() == new UndirectedEdge(6, 6, weight).hashCode());
    }
View Full Code Here

TOP

Related Classes of de.timefinder.algo.graph.UndirectedEdge

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.