Package com.sun.sgs.impl.service.nodemap.affinity.graph

Examples of com.sun.sgs.impl.service.nodemap.affinity.graph.WeightedEdge


            // For each object accessed in this task...
            for (AccessedObject obj : detail.getAccessedObjects()) {   
                Object objId = obj.getObjectId();
                bipartiteGraph.addVertex(objId);
                // We use weighted edges to reduce the total number of edges
                WeightedEdge ae = bipartiteGraph.findEdge(owner, objId);
                if (ae == null) {
                    WeightedEdge newEdge = new WeightedEdge();
                    bipartiteGraph.addEdge(newEdge, owner, objId);
                    // period info
                    pruneTask.incrementEdge(newEdge);
                } else {
                    ae.incrementWeight();
View Full Code Here


                    long e2Weight = graphCopy.findEdge(v2, objVert).getWeight();
                    long minWeight = Math.min(e1Weight, e2Weight);

                    LabelVertex label1 = getVertex(v1);
                    LabelVertex label2 = getVertex(v2);
                    WeightedEdge edge = foldedGraph.findEdge(label1, label2);
                    if (edge == null) {
                        foldedGraph.addEdge(new WeightedEdge(minWeight),
                                            label1, label2);
                    } else {
                        edge.addWeight(minWeight);
                    }
                }
            }
        }
View Full Code Here

TOP

Related Classes of com.sun.sgs.impl.service.nodemap.affinity.graph.WeightedEdge

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.