Package edu.cmu.graphchi

Examples of edu.cmu.graphchi.ChiVertex$Edge


                }

                if (i < 0) {
                    skip(n);
                } else {
                    ChiVertex vertex = vertices[i];
                    assert(vertex == null || vertex.getId() == curvid);

                    if (vertex != null) {
                        while (--n >= 0) {
                            int target = adjFile.readIntReversed();
                            adjOffset += 4;
                            ChiPointer eptr = readEdgePtr();

                            if (!onlyAdjacency) {
                                if (!curBlock.active) {
                                    if (asyncEdataLoading) {
                                        curBlock.readAsync();
                                    } else {
                                        curBlock.readNow();
                                    }
                                }
                                curBlock.active = true;
                            }
                            vertex.addOutEdge(eptr == null ? -1 : eptr.blockId, eptr == null ? -1 : eptr.offset, target);

                            if (!(target >= rangeStart && target <= rangeEnd)) {
                                throw new IllegalStateException("Target " + target + " not in range!");
                            }
                        }
View Full Code Here


                    adjOffset += 4;
                } else {
                    n = ns;
                }

                ChiVertex vertex = null;
                if (vid >= windowStart && vid <= windowEnd) {
                    vertex = vertices[vid - windowStart];
                }

                while (--n >= 0) {
                    int target = Integer.reverseBytes(adjInput.readInt());
                    adjOffset += 4;
                    if (!(target >= rangeStart && target <= rangeEnd))
                        throw new IllegalStateException("Target " + target + " not in range!");
                    if (vertex != null && !disableOutEdges) {
                        vertex.addOutEdge((onlyAdjacency ? -1 : blockIds[edataPtr / blocksize]), (onlyAdjacency ? -1 : edataPtr % blocksize), target);
                    }

                    if (target >= windowStart) {
                        if (target <= windowEnd) {
                            ChiVertex dstVertex = vertices[target - windowStart];
                            if (dstVertex != null) {
                                dstVertex.addInEdge((onlyAdjacency ? -1 : blockIds[edataPtr / blocksize]),
                                        (onlyAdjacency ? -1 : edataPtr % blocksize),
                                        vid);
                            }
                            if (vertex != null && dstVertex != null) {
                                dstVertex.parallelSafe = false;
View Full Code Here

                for(int subIntervalSt=intervalSt; subIntervalSt < intervalEn; subIntervalSt += SUBINTERVAL) {
                    int subIntervalEn = subIntervalSt + SUBINTERVAL - 1;
                    if (subIntervalEn > intervalEn) subIntervalEn = intervalEn;
                    ChiVertex[] verts = new ChiVertex[subIntervalEn - subIntervalSt + 1];
                    for(int i=0; i < verts.length; i++) {
                        verts[i] = new ChiVertex(i + subIntervalSt, null);
                    }

                    memoryShard.loadVertices(subIntervalSt, subIntervalEn, verts, false, parallelExecutor);
                    for(int i=0; i < numShards; i++) {
                        if (i != p) {
View Full Code Here

TOP

Related Classes of edu.cmu.graphchi.ChiVertex$Edge

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.