org.caida.otter
Class PlotPathsUtil

java.lang.Object
  |
  +--org.caida.otter.PlotPathsUtil

public class PlotPathsUtil
extends java.lang.Object


Constructor Summary
PlotPathsUtil()
           
 
Method Summary
static void quicksort(java.lang.Object[] objectList, java.util.Comparator comparator)
          Generic quicksort that sorts a list of things
static void quicksort(java.lang.Object[] objectList, java.util.Comparator comparator, int leftEnd, int rightEnd)
           
static void quicksortByForeignKey(int[] objectList, int[] foreignKeyList)
          Generic quicksort that sorts a list of objects by a foreign key.
static void quicksortByForeignKey(int[] objectList, int[] foreignKeyList, int leftEnd, int rightEnd)
           
static void quicksortByForeignKey(java.lang.Object[] objectList, int[] foreignKeyList)
          Generic quicksort that sorts a list of objects by a foreign key.
static void quicksortByForeignKey(java.lang.Object[] objectList, int[] foreignKeyList, int leftEnd, int rightEnd)
           
static void quicksortByForeignKey(java.lang.Object[] objectList, java.lang.Object[] foreignKeyList, java.util.Comparator comparator)
          Generic quicksort that sorts a list of objects by a foreign key.
static void removeDuplicatesFromVect(java.util.Vector checkVector)
          Check a vector to see if it contains duplucates, and remove them if it does.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlotPathsUtil

public PlotPathsUtil()
Method Detail

quicksort

public static void quicksort(java.lang.Object[] objectList,
                             java.util.Comparator comparator)
Generic quicksort that sorts a list of things
Parameters:
objectList - list of things to sort
comparator - object that knows how to sort the things that are given in the objectList.

quicksort

public static void quicksort(java.lang.Object[] objectList,
                             java.util.Comparator comparator,
                             int leftEnd,
                             int rightEnd)

quicksortByForeignKey

public static void quicksortByForeignKey(java.lang.Object[] objectList,
                                         int[] foreignKeyList)
Generic quicksort that sorts a list of objects by a foreign key. The subroutine ends up sorting foreignKeyList, and each substitution is mirrored in objectList.
Parameters:
objectList - the objects to sort.
foreignKeyList - the values to sort the objects by. For example the third index into foreignKeyList corresponds to the value given to the third object in objectList. objectList is sorted such that if it was swappin with its foreign key, the foreign keys would be in ascending order.

quicksortByForeignKey

public static void quicksortByForeignKey(java.lang.Object[] objectList,
                                         int[] foreignKeyList,
                                         int leftEnd,
                                         int rightEnd)

quicksortByForeignKey

public static void quicksortByForeignKey(int[] objectList,
                                         int[] foreignKeyList)
Generic quicksort that sorts a list of objects by a foreign key. The subroutine ends up sorting foreignKeyList, and each substitution is mirrored in objectList.
Parameters:
objectList - the objects to sort.
foreignKeyList - the values to sort the objects by. For example the third index into foreignKeyList corresponds to the value given to the third object in objectList. objectList is sorted such that if it was swappin with its foreign key, the foreign keys would be in ascending order.

quicksortByForeignKey

public static void quicksortByForeignKey(int[] objectList,
                                         int[] foreignKeyList,
                                         int leftEnd,
                                         int rightEnd)

quicksortByForeignKey

public static void quicksortByForeignKey(java.lang.Object[] objectList,
                                         java.lang.Object[] foreignKeyList,
                                         java.util.Comparator comparator)
Generic quicksort that sorts a list of objects by a foreign key. The subroutine ends up sorting foreignKeyList, and each substitution is mirrored in objectList.
Parameters:
objectList - the objects to sort.
foreignKeyList - the values to sort the objects by. For example the third index into foreignKeyList corresponds to the value given to the third object in objectList. objectList is sorted such that if it was swappin with its foreign key, the foreign keys would be in ascending order.

removeDuplicatesFromVect

public static void removeDuplicatesFromVect(java.util.Vector checkVector)
Check a vector to see if it contains duplucates, and remove them if it does.
Parameters:
checkVector - vector to check for duplicates