You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mahout.apache.org by Benson Margulies <bi...@gmail.com> on 2010/01/02 02:43:41 UTC

[math] Generic sorting IP status

I finally fixed up my adaptation of the Harmony quick sort to the
'external' case. That leaves the merge sort.

The merge sort is rather popular in the matrix code.

I doubt that the merge code from GenericSorting.java is, in fact, an
IP offense. The quicksort code in there was covered with comments
about how it was made from the JDK code. The merge code, on the other
hand, is a pretty different sort of thing from the JDK. In order to
make it work with a swapper, the author came up with an 'inplace'
merge algorithm, and that's not at all similar to the JDK code.

So I'm going to post up a rather large patch that combines the next
round of templatized collection with with getting rid of the
suspicious quickSort from GenericSorting, and leave the merging code
as it is.

The resulting modularity is only so-so, but that can be cleaned
further later. There are way too many classes named Sorting, for one
thing.