projects
/
IRC.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
a bunch of fixes.
[IRC.git]
/
Robust
/
src
/
Util
/
Lattice.java
diff --git
a/Robust/src/Util/Lattice.java
b/Robust/src/Util/Lattice.java
index 22ed8d64f99c711882b2c9728e1f6390c54bd00c..bc024cfad9cd95f58d7b06bea451823bb879915b 100644
(file)
--- a/
Robust/src/Util/Lattice.java
+++ b/
Robust/src/Util/Lattice.java
@@
-76,7
+76,9
@@
public class Lattice<T> {
topNeighbor.remove(value);
// if key is already connected with bottom,, it is no longer to be
topNeighbor.remove(value);
// if key is already connected with bottom,, it is no longer to be
- table.get(key).remove(getBottomItem());
+ if (!value.equals(getBottomItem())) {
+ table.get(key).remove(getBottomItem());
+ }
return true;
} else
return true;
} else
@@
-129,7
+131,9
@@
public class Lattice<T> {
Set<T> neighborSet = get(a);
Set<T> neighborSet = get(a);
- if (neighborSet == null) {
+ if (a.equals(b)) {
+ return true;
+ } else if (neighborSet == null) {
return false;
} else if (neighborSet.contains(b)) {
return true;
return false;
} else if (neighborSet.contains(b)) {
return true;
@@
-146,6
+150,10
@@
public class Lattice<T> {
public boolean isGreaterThan(T a, T b) {
public boolean isGreaterThan(T a, T b) {
+ if (a.equals(b)) {
+ return false;
+ }
+
if (a.equals(top)) {
if (b.equals(top)) {
return false;
if (a.equals(top)) {
if (b.equals(top)) {
return false;