|
@@ -81,16 +81,17 @@ public class BasicMappingOperator implements ScopvizGraphOperator {
|
|
@Override
|
|
@Override
|
|
public int compare(Node o1, Node o2) {
|
|
public int compare(Node o1, Node o2) {
|
|
Main m = Main.getInstance();
|
|
Main m = Main.getInstance();
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ // the cmparator uses a reverse ordering so that the resulting list is sorted descending
|
|
// this does: process-need(o1) - process-need(o2)
|
|
// this does: process-need(o1) - process-need(o2)
|
|
Double result = m.convertAttributeTypes(o1.getAttribute("process-need"), new Double(0))
|
|
Double result = m.convertAttributeTypes(o1.getAttribute("process-need"), new Double(0))
|
|
- m.convertAttributeTypes(o2.getAttribute("process-need"), new Double(0));
|
|
- m.convertAttributeTypes(o2.getAttribute("process-need"), new Double(0));
|
|
if (result == 0.0) {
|
|
if (result == 0.0) {
|
|
return 0;
|
|
return 0;
|
|
} else if (result < 0.0) {
|
|
} else if (result < 0.0) {
|
|
- return -1;
|
|
|
|
- } else {
|
|
|
|
return 1;
|
|
return 1;
|
|
|
|
+ } else {
|
|
|
|
+ return -1;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|