Package org.gephi.graph.dhns.graph

Examples of org.gephi.graph.dhns.graph.HierarchicalUndirectedGraphImpl.addEdge()


        graph.addNode(node1);
        graph.addNode(node2);
        graph.addNode(node3);

        //Test normal edge
        graph.addEdge(node1, node2);
        AbstractNode preNode1 = (AbstractNode) node1;
        AbstractNode preNode2 = (AbstractNode) node2;

        AbstractEdge edge = preNode1.getEdgesOutTree().getItem(preNode2.getNumber());
        assertNotNull("find OUT edge", edge);
View Full Code Here


        assertTrue("contains IN edge", preNode2.getEdgesInTree().contains(edge2));
        assertSame("edges equal", edge, edge2);
        assertEquals("edges count", 1, graph.getEdgeCount());

        //Test mutual edge add fail
        graph.addEdge(node2, node1);

        assertNull("cant find OUT edge", preNode2.getEdgesOutTree().getItem(preNode1.getNumber()));
        assertEquals("edges count", 1, graph.getEdgeCount());

View Full Code Here

        assertNull("cant find OUT edge", preNode2.getEdgesOutTree().getItem(preNode1.getNumber()));
        assertEquals("edges count", 1, graph.getEdgeCount());


        //Test factoryedge
        graph.addEdge(edge);
        assertEquals("edges count", 1, graph.getEdgeCount());

        //Test self loop
        graph.addEdge(node3, node3);
View Full Code Here

        //Test factoryedge
        graph.addEdge(edge);
        assertEquals("edges count", 1, graph.getEdgeCount());

        //Test self loop
        graph.addEdge(node3, node3);

        AbstractNode preNode3 = (AbstractNode) node3;

        AbstractEdge edge3 = preNode3.getEdgesOutTree().getItem(preNode3.getNumber());
        assertNotNull("find OUT edge", edge);
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.