Package edu.cmu.graphchi.engine.auxdata

Examples of edu.cmu.graphchi.engine.auxdata.VertexDegree


        for(int j=0; j < nvertices; j++) {
            if (enableScheduler && !scheduler.isScheduled(j + firstVertexId)) {
                continue;
            }

            VertexDegree degree = degreeHandler.getDegree(j + firstVertexId);
            if (skipZeroDegreeVertices && (degree.inDegree + degree.outDegree == 0)) {
                continue;
            }

            ChiVertex<VertexDataType, EdgeDataType> v = new ChiVertex<VertexDataType, EdgeDataType>(j + firstVertexId, degree);
View Full Code Here


            for(int i=0; i< maxInterval; i++) {
                if (enableScheduler) {
                    if (!scheduler.isScheduled(i + subIntervalStart)) continue;
                }
                VertexDegree deg = degreeHandler.getDegree(i + subIntervalStart);
                int inc = deg.inDegree;
                int outc = deg.outDegree;

                if (inc + outc == 0 && skipZeroDegreeVertices) {
                    continue;
View Full Code Here

        FloatConverter floatConv = new FloatConverter();

        ChiVertex.edgeValueConverter = floatConv;
        ChiVertex.vertexValueConverter = floatConv;
        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);
View Full Code Here

        ChiVertex.edgeValueConverter = floatConv;
        ChiVertex.vertexValueConverter = floatConv;
        ChiVertex.blockManager = blockMgr;

        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);
View Full Code Here

        ChiVertex.edgeValueConverter = floatConv;
        ChiVertex.vertexValueConverter = floatConv;
        ChiVertex.blockManager = blockMgr;

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

        assertEquals(vertex.numOutEdges(), 0);

        for(int i=0; i < nOutedges; i++) {
View Full Code Here

    @Test
    public void testBasicMethod() {

        final float[] weights = initWeights(1000);

        ChiVertex<Integer, Float> vert = new ChiVertex<Integer, Float>(0, new VertexDegree(0, weights.length)) {
            public Float getOutEdgeValue(int i) {
                return weights[i];
            }

            @Override
View Full Code Here

    @Test
    public void testBasicMethodSmall() {
        final float[] weights = initWeights(18);

        ChiVertex<Integer, Float> vert = new ChiVertex<Integer, Float>(0, new VertexDegree(0, weights.length)) {
            public Float getOutEdgeValue(int i) {
                return weights[i];
            }

            @Override
View Full Code Here

    @Test
    public void testAliasMethod() {

        final float[] weights = initWeights(1000);
        ChiVertex<Integer, Float> vert = new ChiVertex<Integer, Float>(0, new VertexDegree(0, weights.length)) {
            public Float getOutEdgeValue(int i) {
                return weights[i];
            }

            @Override
View Full Code Here

TOP

Related Classes of edu.cmu.graphchi.engine.auxdata.VertexDegree

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.