mahout-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benson Margulies <bimargul...@gmail.com>
Subject [math] API for sorting objects; cleaning up generic usage to avoid needing to suppress warnings
Date Wed, 23 Dec 2009 17:29:01 GMT
Current:

  public static void quickSort(Object[] a) {
    quickSort1(a, 0, a.length);
  }

proposed:

  public static <T extends Comparable<? super T>>  static void quickSort(T[])
{
    ...
 }

The contract is that the objects implement Comparable. I took the
above from Collections.sort.

There are no current callers of this function.

Mime
View raw message