Package edu.cmu.graphchi.datablocks

Examples of edu.cmu.graphchi.datablocks.IntConverter


        GraphChiEngine<Integer, Integer> engine =
                new GraphChiEngine<Integer, Integer>(inputFilePath, nShards);
        engine.setMemoryBudgetMb(memBudget);
        engine.setSkipZeroDegreeVertices(true);
        engine.setEnableScheduler(true);
        engine.setEdataConverter(new IntConverter());
        engine.setVertexDataConverter(new IntConverter());

        engine.run(new KCoreDecomposer(), INFINITY);

        logger.info("Ready.");
View Full Code Here


            }
        }, new EdgeProcessor<Integer>() {
            public Integer receiveEdge(int from, int to, String token) {
                return 0;
            }
        }, new IntConverter(), new IntConverter());
    }
View Full Code Here

        /* Running GraphChi */
        GraphChiEngine<Integer, Integer> engine = new GraphChiEngine<Integer, Integer>(inputFilePath, nShards);
        engine.setMemoryBudgetMb(memBudget);
        engine.setSkipZeroDegreeVertices(true);
        engine.setEnableScheduler(true);
        engine.setEdataConverter(new IntConverter());
        engine.setVertexDataConverter(new IntConverter());

        engine.run(new GraphTransformer(), 1);

        stopWriting();
       
View Full Code Here

     * @throws IOException
     */
    public static Collection<IdCount> computeLabels(String baseFilename, int numVertices,
                                                    VertexIdTranslate translate) throws IOException {
        final HashMap<Integer, IdCount> counts = new HashMap<Integer, IdCount>(1000000);
        VertexAggregator.foreach(numVertices, baseFilename, new IntConverter(), new ForeachCallback<Integer>() {
            public void callback(int vertexId, Integer vertexValue) {
                 if (vertexId != vertexValue) {
                    IdCount cnt = counts.get(vertexValue);
                     if (cnt == null) {
                         cnt = new IdCount(vertexValue, 1);
View Full Code Here

            public int compare(IdInt a, IdInt b) {
                if (a.vertexId == b.vertexId) return 0;
                return  (a.value > b.value ? -1 : (a.value == b.value ? (a.vertexId < b.vertexId ? -1 : 1) : 1)); // Descending order
            }
        });
        VertexAggregator.foreach(numVertices, baseFilename, new IntConverter(), new ForeachCallback<Integer>()  {
            IdInt least;
            public void callback(int vertexId, Integer vertexValue) {
                if (topList.size() < topN) {
                    topList.add(new IdInt(vertexId, vertexValue));
                    least = topList.last();
View Full Code Here

TOP

Related Classes of edu.cmu.graphchi.datablocks.IntConverter

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.