projects
/
anneal.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
4cfb993
)
checkpoint
author
adam
<adam@megacz.com>
Sun, 16 Dec 2007 02:26:33 +0000
(18:26 -0800)
committer
adam
<adam@megacz.com>
Sun, 16 Dec 2007 02:26:33 +0000
(18:26 -0800)
darcs-hash:
20071216022633
-5007d-
bc58cf7673f810bb82c9667198eb586e9cc9c71f
.gz
src/edu/berkeley/qfat/Mesh.java
patch
|
blob
|
history
diff --git
a/src/edu/berkeley/qfat/Mesh.java
b/src/edu/berkeley/qfat/Mesh.java
index
2367999
..
8f3e6ab
100644
(file)
--- a/
src/edu/berkeley/qfat/Mesh.java
+++ b/
src/edu/berkeley/qfat/Mesh.java
@@
-298,8
+298,6
@@
public class Mesh implements Iterable<Mesh.T> {
public E getFreeIncident() {
E ret = getFreeIncident(e, e);
if (ret != null) return ret;
public E getFreeIncident() {
E ret = getFreeIncident(e, e);
if (ret != null) return ret;
- //ret = getFreeIncident(e.pair.next, e.pair.next);
- if (ret != null) return ret;
for(E e = this.e; e!=null; e=e.pair.next==this.e?null:e.pair.next)
System.out.println(e + " " + e.t);
throw new Error("unable to find free incident to " + this);
for(E e = this.e; e!=null; e=e.pair.next==this.e?null:e.pair.next)
System.out.println(e + " " + e.t);
throw new Error("unable to find free incident to " + this);
@@
-332,11
+330,9
@@
public class Mesh implements Iterable<Mesh.T> {
}
public boolean isBoundTo(Vertex p) {
}
public boolean isBoundTo(Vertex p) {
- Vertex px = p;
- do {
- if (px==this) return true;
- px = px.bound_to;
- } while(px != p);
+ for(Vertex px = p; px!=null; px=(px.bound_to==p?null:px.bound_to))
+ if (px==this)
+ return true;
return false;
}
public void unbind() { bound_to = this; binding = Matrix.ONE; }
return false;
}
public void unbind() { bound_to = this; binding = Matrix.ONE; }