Examples of ChiPointer


Examples of edu.cmu.graphchi.datablocks.ChiPointer

        ChiVertex.blockManager = blockMgr;
        ChiVertex<Float, Float> vertex = new ChiVertex<Float, Float>(1, new VertexDegree(0, 0));
        assertEquals(vertex.getId(), 1);

        int offset = 1024;
        ChiPointer vertexDataPtr = new ChiPointer(blockId, offset);

        blockMgr.writeValue(vertexDataPtr, floatConv, 3.0f);
        vertex.setDataPtr(vertexDataPtr);

        assertEquals(vertex.getValue(), 3.0f, 1e-15);
View Full Code Here

Examples of edu.cmu.graphchi.datablocks.ChiPointer

        ChiVertex<Float, Float> vertex = new ChiVertex<Float, Float>(5, new VertexDegree(nInedges, 0));
        assertEquals(vertex.getId(), 5);

        for(int i=0; i < nInedges; i++) {
            blockMgr.writeValue(new ChiPointer(blockId, i * 4), floatConv, (float) Math.sin(i / 2));
            vertex.addInEdge(blockId, i * 4, i * 7 + 5);
        }
        assertEquals(vertex.numOutEdges(), 0);

        assert(vertex.numInEdges() == nInedges);
View Full Code Here

Examples of edu.cmu.graphchi.datablocks.ChiPointer

        assertEquals(vertex.getId(), 5);

        assertEquals(vertex.numOutEdges(), 0);

        for(int i=0; i < nOutedges; i++) {
            blockMgr.writeValue(new ChiPointer(blockId, i * 4), floatConv, (float) Math.cos(i / 2));
            vertex.addOutEdge(blockId, i * 4, i * 7 + 5);
            assertEquals(vertex.numOutEdges(), i + 1);
        }
        assertEquals(vertex.numInEdges(), 0);

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.