Is there any particular reason why neg_epsilon != -epsilon in org.lemurproject.galago.tupleflow.Utility:
epsilon = 0.5 * Math.pow(10, -10);
neg_epsilon = -1.0 * Math.pow(10, -10);
They are used in Utility.compare(double, double), and will cause java.lang.IllegalArgumentException (Comparison method violates its general contract) when using Utility.compare in sorting.
public static int compare(double one, double two) {
double result = one - two;
if (result > epsilon) {
return 1;
}
if (result < neg_epsilon) {
return -1;
}
return 0;
}
to ship in 6/2014 release.