public void updateMetadataInformation(Graph<Integer> graph) { graph.selectMetadataLayer(Layer.INSTRUCTIONS.getLayer()); sourceGraph.selectMetadataLayer(Layer.INSTRUCTIONS.getLayer()); Iterator<Node<Integer>> sourceGraphIt = sourceGraph.getNodes().iterator(); Iterator<Node<Integer>> graphIt = graph.getNodes().iterator(); while (sourceGraphIt.hasNext() && graphIt.hasNext()) { Node<Integer> gNode = graphIt.next(); Node<Integer> sgNode = sourceGraphIt.next(); sourceGraph.addMetadata(sgNode, null); sourceGraph.addMetadata(sgNode, graph.getMetadata(gNode)); } setChanged(); notifyObservers(new CFGUpdateEvent(sourceGraph)); }
public void applyVisitor(IGraphVisitor<Integer> visitor) { sourceGraph.accept(visitor); }
public int numberOfNodes() { return sourceGraph.size(); }