projects
/
sbp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
intermediate checkpoint
[sbp.git]
/
src
/
edu
/
berkeley
/
sbp
/
Forest.java
diff --git
a/src/edu/berkeley/sbp/Forest.java
b/src/edu/berkeley/sbp/Forest.java
index
8ed6eb5
..
ef420a8
100644
(file)
--- a/
src/edu/berkeley/sbp/Forest.java
+++ b/
src/edu/berkeley/sbp/Forest.java
@@
-159,8
+159,9
@@
public abstract class Forest<T> {
public String toString() { return resolve().toString(); }
public Forest resolve() {
if (hp==null) return res;
public String toString() { return resolve().toString(); }
public Forest resolve() {
if (hp==null) return res;
- HashSet<Body> results = null;
FastSet<Body> nh = new FastSet<Body>();
FastSet<Body> nh = new FastSet<Body>();
+ /*
+ HashSet<Body> results = null;
for(Forest<?> p : hp)
for(Body<?> b : (IterableForest<?>)p) {
if (b.keep() && (b.creator==null || !b.creator.lame)) {
for(Forest<?> p : hp)
for(Body<?> b : (IterableForest<?>)p) {
if (b.keep() && (b.creator==null || !b.creator.lame)) {
@@
-183,7
+184,13
@@
public abstract class Forest<T> {
}
}
hp = null;
}
}
hp = null;
- res = new MultiForest(nh, valid);
+ */
+ for(Forest<?> p : hp)
+ for(Body<?> b : (IterableForest<?>)p)
+ if (b.creator==null || !b.creator.lame)
+ b.addTo(nh);
+ res = new MultiForest(nh, nh.size()>0);
+ hp = null;
return res;
}
}
return res;
}
}