private void addEdgeAddingNewVertexAndPropagatingIfNeeded (Link e , IPGNode edgeInitialNode , boolean propagateUpwards) { IPGNode ipgNode = link2IGPVertexMap.get(e); final boolean newlyCreatedIPG = (ipgNode == null); if (newlyCreatedIPG) { ipgNode = new IPGNode (null , e , null); link2IGPVertexMap.put(e , ipgNode); this.interLayerPropagationGraph.addVertex(ipgNode); } try { this.interLayerPropagationGraph.addDagEdge(edgeInitialNode , ipgNode , new Object ()); } catch (CycleFoundException ex) { throw new RuntimeException(ex.getMessage()); } if (newlyCreatedIPG) if (propagateUpwards) addVertexAndEdgesToGraphFromInitialIPGUpwards(ipgNode); else addVertexAndEdgesToGraphFromInitialIPGDownwards(ipgNode); } private void addEdgeAddingNewVertexAndPropagatingIfNeeded (Demand d , IPGNode edgeInitialNode , boolean propagateUpwards)
private void addEdgeAddingNewVertexAndPropagatingIfNeeded (Pair<MulticastDemand,Node> m , IPGNode edgeInitialNode , boolean propagateUpwards) { IPGNode ipgNode = mDemandAndNode2VertexMap.get(m); final boolean newlyCreatedIPG = (ipgNode == null); if (newlyCreatedIPG) { ipgNode = new IPGNode (null , null, m); mDemandAndNode2VertexMap.put(m , ipgNode); this.interLayerPropagationGraph.addVertex(ipgNode); } try { this.interLayerPropagationGraph.addDagEdge(edgeInitialNode , ipgNode , new Object ()); } catch (CycleFoundException ex) { throw new RuntimeException(ex.getMessage()); } if (newlyCreatedIPG) if (propagateUpwards) addVertexAndEdgesToGraphFromInitialIPGUpwards(ipgNode); else addVertexAndEdgesToGraphFromInitialIPGDownwards(ipgNode); }
private void addEdgeAddingNewVertexAndPropagatingIfNeeded (Demand d , IPGNode edgeInitialNode , boolean propagateUpwards) { IPGNode ipgNode = demand2IGPVertexMap.get(d); final boolean newlyCreatedIPG = (ipgNode == null); if (newlyCreatedIPG) { ipgNode = new IPGNode (d , null, null); demand2IGPVertexMap.put(d , ipgNode); this.interLayerPropagationGraph.addVertex(ipgNode); } try { this.interLayerPropagationGraph.addDagEdge(edgeInitialNode , ipgNode , new Object ()); } catch (CycleFoundException ex) { throw new RuntimeException(ex.getMessage()); } if (newlyCreatedIPG) if (propagateUpwards) addVertexAndEdgesToGraphFromInitialIPGUpwards(ipgNode); else addVertexAndEdgesToGraphFromInitialIPGDownwards(ipgNode); } private void addEdgeAddingNewVertexAndPropagatingIfNeeded (Pair<MulticastDemand,Node> m , IPGNode edgeInitialNode , boolean propagateUpwards)
for (IPGNode initialNode : this.initialIPGVertices) if (upWardsTrueDownwardsFalse) addVertexAndEdgesToGraphFromInitialIPGUpwards (initialNode); else addVertexAndEdgesToGraphFromInitialIPGDownwards (initialNode);