projects
/
anneal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
checkpoint
[anneal.git]
/
src
/
edu
/
berkeley
/
qfat
/
Mesh.java
diff --git
a/src/edu/berkeley/qfat/Mesh.java
b/src/edu/berkeley/qfat/Mesh.java
index
8a697dc
..
12b3503
100644
(file)
--- a/
src/edu/berkeley/qfat/Mesh.java
+++ b/
src/edu/berkeley/qfat/Mesh.java
@@
-322,12
+322,10
@@
public class Mesh implements Iterable<Mesh.T> {
private HashSet<E> left = new HashSet<E>();
private HashSet<E> right = new HashSet<E>();
public BindingGroup() { }
private HashSet<E> left = new HashSet<E>();
private HashSet<E> right = new HashSet<E>();
public BindingGroup() { }
- public BindingGroup(E e) {
- left.add(e);
- }
+ public BindingGroup(E e) { add(e, false); }
public void add(E e, boolean swap) {
if (e.bg != null) {
public void add(E e, boolean swap) {
if (e.bg != null) {
- if (e.bg == this) return;
+ if (e.bg == this) return; /* fixme what if it is in the "other" set? */
for(E ex : (!swap ? e.bg.left : e.bg.right)) {
ex.bg = this;
left.add(ex);
for(E ex : (!swap ? e.bg.left : e.bg.right)) {
ex.bg = this;
left.add(ex);
@@
-342,7
+340,6
@@
public class Mesh implements Iterable<Mesh.T> {
}
}
public void dobind(E e) {
}
}
public void dobind(E e) {
- // assumes e is part of the "left" set
Vert v1 = null;
Vert v2 = null;
if (left.contains(e)) { v1 = e.p1; v2 = e.p2; }
Vert v1 = null;
Vert v2 = null;
if (left.contains(e)) { v1 = e.p1; v2 = e.p2; }
@@
-362,9
+359,11
@@
public class Mesh implements Iterable<Mesh.T> {
for(E e : left) {
e.shatter(e.midpoint(), bg1, bg2);
}
for(E e : left) {
e.shatter(e.midpoint(), bg1, bg2);
}
+ /*
for(E e : right) {
for(E e : right) {
- e.shatter(e.midpoint(), bg2, bg1); /* swap correct? */
+ e.shatter(e.midpoint(), bg1, bg2); // swap correct?
}
}
+ */
}
}
}
}