rename Node->StateNode
[sbp.git] / src / edu / berkeley / sbp / Forest.java
index 795f3a0..636ad4f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright 2006 all rights reserved; see LICENSE file for BSD-style license
+// Copyright 2006-2007 all rights reserved; see LICENSE file for BSD-style license
 
 package edu.berkeley.sbp;
 import edu.berkeley.sbp.util.*;
@@ -37,7 +37,7 @@ public abstract class Forest<NodeType> implements GraphViz.ToGraphViz {
 
     abstract void expand(HashSet<Tree<NodeType>> ht, HashSet<Forest<NodeType>> ignore, Tree<NodeType> bogus);
     abstract void gather(HashSet<Forest<NodeType>> ignore);
-    abstract void edges(GraphViz.Node n);
+    abstract void edges(GraphViz.StateNode n);
     boolean ambiguous() { return false; }
     
     // One //////////////////////////////////////////////////////////////////////////////
@@ -97,16 +97,16 @@ public abstract class Forest<NodeType> implements GraphViz.ToGraphViz {
 
         public boolean isTransparent() { return false; }
         public boolean isHidden() { return false; }
-        public GraphViz.Node toGraphViz(GraphViz gv) {
+        public GraphViz.StateNode toGraphViz(GraphViz gv) {
             if (gv.hasNode(this)) return gv.createNode(this);
-            GraphViz.Node n = gv.createNode(this);
+            GraphViz.StateNode n = gv.createNode(this);
             n.label = headToString()==null?"":headToString();
             n.directed = true;
             edges(n);
             return n;
         }
         boolean edges = false; // FIXME ??
-        public void edges(GraphViz.Node n) {
+        public void edges(GraphViz.StateNode n) {
             if (edges) return;
             edges = true;
             for(int i=0; i<children.length; i++) {
@@ -210,14 +210,14 @@ public abstract class Forest<NodeType> implements GraphViz.ToGraphViz {
 
         public boolean isTransparent() { return hp.size()==1; }
         public boolean isHidden() { return hp.size()==0; }
-        public void edges(GraphViz.Node n) {
+        public void edges(GraphViz.StateNode n) {
             if (hp.size()==1) { hp.iterator().next().edges(n); return; }
             for(Forest f : hp) f.edges(n);
         }
-        public GraphViz.Node toGraphViz(GraphViz gv) {
+        public GraphViz.StateNode toGraphViz(GraphViz gv) {
             if (hp.size()==1) return hp.iterator().next().toGraphViz(gv);
             if (gv.hasNode(this)) return gv.createNode(this);
-            GraphViz.Node n = gv.createNode(this);
+            GraphViz.StateNode n = gv.createNode(this);
             n.label = "?";
             n.color = "red";
             for(Forest f : hp) n.edge(f, null);