start of new file
[IRC.git] / Robust / src / IR / Flat / FlatNode.java
index 6463fcabd34718ce54869505d337b612e65689cf..714b894bfad3ba57e37519aab8c23afa324e2109 100644 (file)
@@ -31,6 +31,15 @@ public class FlatNode {
        next.add(n);
        n.addPrev(this);
     }
+
+    /** This function modifies the graph */
+    public void setNext(int i, FlatNode n) {
+       FlatNode old=getNext(i);
+       next.set(i, n);
+       old.prev.remove(this);
+       n.addPrev(this);
+    }
+
     protected void addPrev(FlatNode p) {
        prev.add(p);
     }