org.gersteinlab.regulation.util
Class Util

java.lang.Object
  extended by org.gersteinlab.regulation.util.Util

public class Util
extends java.lang.Object

        This class provides some utility functions.
        

Version:
1.0 (November 5, 2007)
        Change History:
        1.0     - Initial version
        
Author:
Kevin Yuk-Lap Yip

Constructor Summary
Util()
           
 
Method Summary
static void coSort(double[] values, java.lang.Object[] auxValues)
          Sort an array of numbers in ascending order, and arrange the entries in a second array accordingly.
static void coSort(double[] values, java.lang.Object[] auxValues, boolean ascending)
          Sort an array of numbers, and arrange the entries in a second array accordingly.
static void coSort(double[] values, java.lang.Object[] auxValues, boolean ascending, int start, int end)
          Sort a continuous subarray of an array of numbers, and arrange the entries in a second array accordingly.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
Method Detail

coSort

public static void coSort(double[] values,
                          java.lang.Object[] auxValues)
Sort an array of numbers in ascending order, and arrange the entries in a second array accordingly.

Parameters:
values - The values to be sorted
auxValues - The auxilary values to be ordered accordingly

coSort

public static void coSort(double[] values,
                          java.lang.Object[] auxValues,
                          boolean ascending)
Sort an array of numbers, and arrange the entries in a second array accordingly.

Parameters:
values - The values to be sorted
auxValues - The auxilary values to be ordered accordingly
ascending - Whether the list is to be sorted in ascending order

coSort

public static void coSort(double[] values,
                          java.lang.Object[] auxValues,
                          boolean ascending,
                          int start,
                          int end)
Sort a continuous subarray of an array of numbers, and arrange the entries in a second array accordingly.

Parameters:
values - The values to be sorted
auxValues - The auxilary values to be ordered accordingly
ascending - Whether the list is to be sorted in ascending order
start - The index of the first element in the subarray
end - The index of the last element in the subarray