Hello Luc.

> >>          for (int i = tableau.getNumObjectiveFunctions(); i < 
> >> tableau.getWidth() - 1; i++) {
> >> -            if (MathUtils.compareTo(tableau.getEntry(0, i), minValue, 
> >> epsilon) < 0) {
> >> -                minValue = tableau.getEntry(0, i);
> >> +            final double entry = tableau.getEntry(0, i);
> >> +            if (MathUtils.compareTo(entry, minValue, getEpsilon(entry)) < 
> >> 0) {
> > 
> >                                                        ^^^^^^^^^^^^^^^^^^
> > 
> > I thought that Thomas agreed that "MathUtils.equals(double,double,int)"
> > should be used instead of "getEpsilon".
> 
> His getEpsilon method uses the maxUlp value. Some of the tests also
> check for sign (like the one you quoite here) and not for equality.
> 
> I'll check this again tomorrow and will fix the equality tests.

I know nothing about the details of this algorithm, but what I thought I had
understood about the requested changes is that they were linked to the use
of "ulps" and thus, I think that it would be preferrable to use them
explicitely in the algorithm instead of "getEpsilon"; we would avoid a mix
of "double" (epsilon) and "int" (maxUlps) variables (where the former in
fact hides the latter).
If necessary we could also add "compareTo(double, double, int)" in
"MathUtils".


Best regards,
Gilles

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to