Package org.gephi.layout.plugin.force.quadtree

Examples of org.gephi.layout.plugin.force.quadtree.QuadTree.x()


        QuadTree tree = new QuadTree(0, 0, 10, 0);
        assertEquals(tree.mass(), 0);

        assertTrue(tree.addNode(new TestNode(1, 1)));
        assertEquals(1, tree.mass());
        assertEquals(1, tree.x(), eps);
        assertEquals(1, tree.y(), eps);

        assertTrue(tree.addNode(new TestNode(9, 9)));
        assertEquals(tree.mass(), 2);
        assertEquals(5, tree.x(), eps);
View Full Code Here


        assertEquals(1, tree.x(), eps);
        assertEquals(1, tree.y(), eps);

        assertTrue(tree.addNode(new TestNode(9, 9)));
        assertEquals(tree.mass(), 2);
        assertEquals(5, tree.x(), eps);
        assertEquals(5, tree.y(), eps);
    }

    @org.junit.Test
    public void testMaxLevel1() {
View Full Code Here

        QuadTree tree = new QuadTree(0, 0, 10, 1);
        assertEquals(0, tree.mass());

        assertTrue(tree.addNode(new TestNode(1, 1)));
        assertEquals(1, tree.mass());
        assertEquals(1, tree.x(), eps);
        assertEquals(1, tree.y(), eps);

        assertTrue(tree.addNode(new TestNode(9, 9)));
        assertEquals(2, tree.mass());
        assertEquals(5, tree.y(), eps);
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.