remove interface Comparable from IntegerLeastSquareSolution
The IntegerLeastSquareSolution
implements Comparable
but this is
not strictly needed from an API point of view. The sorting order
of various solutions is more related to the algorithm that solves the
integer least squares problem and is generally related only to some
properties (the squared distance to the float solution), not to the
other properties (the integers).
Having IntegerLeastSquareSolution
implement Comparable
also implies
implementing equals
which itself involves implementing hashCode
.
However, from a logical point of view, these two methods should depend
on all properties, not only on the squared distance, and therefore be
inconsistent with compareTo
.
It would be more consistent if IntegerLeastSquareSolution
does not
implement Comparable
but the solver uses a separate and dedicated
Comparator
for sorting.
This change is however backward incompatible, so it can be done only for a major release.