Package com.tinkerpop.furnace.algorithms.vertexcentric

Examples of com.tinkerpop.furnace.algorithms.vertexcentric.VertexMemory


    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);
        assertEquals(results.getProperty(graph.getVertex(3), DegreeRankProgram.DEGREE), 3l);
        assertEquals(results.getProperty(graph.getVertex(4), DegreeRankProgram.DEGREE), 1l);
        assertEquals(results.getProperty(graph.getVertex(5), DegreeRankProgram.DEGREE), 1l);
        assertEquals(results.getProperty(graph.getVertex(6), DegreeRankProgram.DEGREE), 0l);

    }
View Full Code Here

TOP

Related Classes of com.tinkerpop.furnace.algorithms.vertexcentric.VertexMemory

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.