Examples of DegreeRankProgram


Examples of com.tinkerpop.furnace.algorithms.vertexcentric.programs.ranking.DegreeRankProgram

    public void testBasicParallelComputer() {
        Graph graph = TinkerGraphFactory.createTinkerGraph();

        for (int workers = 1; workers < 25; workers++) {
            for (int threads = 1; threads < 25; threads++) {
                DegreeRankProgram program = DegreeRankProgram.create().build();
                ParallelGraphComputer computer = new ParallelGraphComputer(graph, program, GraphComputer.Isolation.BSP);
                computer.execute();
                VertexMemory results = computer.getVertexMemory();
                testDegree(graph, results);
            }
View Full Code Here

Examples of com.tinkerpop.furnace.algorithms.vertexcentric.programs.ranking.DegreeRankProgram

*/
public class SerialGraphComputerTest extends TestCase {

    public void testBasicSerialComputer() {
        Graph graph = TinkerGraphFactory.createTinkerGraph();
        DegreeRankProgram program = DegreeRankProgram.create().build();
        SerialGraphComputer computer = new SerialGraphComputer(graph, program, GraphComputer.Isolation.BSP);
        computer.execute();
        VertexMemory results = computer.getVertexMemory();
        assertEquals(results.getProperty(graph.getVertex(1), DegreeRankProgram.DEGREE), 0l);
        assertEquals(results.getProperty(graph.getVertex(2), DegreeRankProgram.DEGREE), 1l);
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.