public class Utilities
extends java.lang.Object
Collection of auxiliary methods.
| Modifier and Type | Field and Description |
|---|---|
protected static double |
log2
The log of 2.
|
| Constructor and Description |
|---|
Utilities() |
| Modifier and Type | Method and Description |
|---|---|
static double |
logFunc(double num)
Help method for computing entropy.
|
static void |
mergeSort(long[] theArray,
int nElems)
Mergesort algorithm for an array of long integers.
|
static void |
mergeSort(Pair[] theArray,
int nElems)
Mergesort algorithm for an array of Pairs.
|
public static void mergeSort(long[] theArray,
int nElems)
theArray - long[] the Array to sortnElems - int size of theArraypublic static void mergeSort(Pair[] theArray, int nElems)
theArray - Pair[] the Array to sortnElems - int size of theArraypublic static double logFunc(double num)
num - the number