Examples of calculateForce()


Examples of org.gephi.layout.plugin.force.quadtree.BarnesHut.calculateForce()

    public void testLeafTree() {
        QuadTree tree = new QuadTree(0, 0, 10, 10);
        tree.addNode(new TestNode(1, 1));
        BarnesHut barnesHut = new BarnesHut(new TestForce());

        ForceVector f = barnesHut.calculateForce(tree, tree);
        assertNotNull(f);
        assertEquals(f.x(), 1, eps);
        assertEquals(f.y(), 1, eps);
    }
}
View Full Code Here

Examples of org.gephi.layout.plugin.force.quadtree.BarnesHut.calculateForce()

        barnes.setTheta(getBarnesHutTheta());
        for (Node node : nodes) {
            NodeData data = node.getNodeData();
            ForceVector layoutData = data.getLayoutData();

            ForceVector f = barnes.calculateForce(data, tree);
            layoutData.add(f);
//            electricEnergy += f.getEnergy();
        }

        // Apply edge forces.
View Full Code Here

Examples of org.gephi.layout.plugin.force.quadtree.BarnesHut.calculateForce()

        BarnesHut barnes = new BarnesHut(getNodeForce());
        barnes.setTheta(getBarnesHutTheta());
        for (Node node : nodes) {
            ForceVector layoutData = node.getLayoutData();

            ForceVector f = barnes.calculateForce(node, tree);
            layoutData.add(f);
//            electricEnergy += f.getEnergy();
        }

        // Apply edge forces.
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.