| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjebl.util.Utils
public class Utils
Provides some miscellaneous methods.
| Constructor Summary | |
|---|---|
| Utils() | |
| Method Summary | |
|---|---|
| static void | copy(double[][] source,
     double[][] dest)Copies all of source into dest - assumes dest to be large enough | 
| static int | getArgmax(double[] array)Find the maximum "argument" (of a double array). | 
| static int | getArgmax(int[] array)Find the maximum "argument". | 
| static boolean[][] | getCopy(boolean[][] array)Clones an array of booleans | 
| static byte[] | getCopy(byte[] array)Clones an array of bytes | 
| static byte[][] | getCopy(byte[][] array)Clones an array of bytes | 
| static double[] | getCopy(double[] array)Clones an array of doubles | 
| static double[][] | getCopy(double[][] array)Clones an array of doubles | 
| static double[][][] | getCopy(double[][][] array)Clones an array of doubles | 
| static double[] | getCopy(double[] array,
        int start)Clones an array of doubles from index start (inclusive) to end | 
| static double[] | getCopy(double[] array,
        int start,
        int end)Clones an array of doubles from index start (inclusive) to index end (exclusive) | 
| static int[] | getCopy(int[] array)Clones an array of ints | 
| static int[][] | getCopy(int[][] matrix)Clones a matrix of ints | 
| static int[] | getCopy(int[] array,
        int startingIndex)Clones an array of ints | 
| static String[] | getCopy(String[] array)Clones an array of Strings | 
| static double | getMax(double[] array)Calculate the max of an array | 
| static double | getMax(double[] array,
       int start,
       int end)Calculate the max of an array | 
| static double | getMean(double[] array)Calculate the mean value of an array | 
| static double | getMin(double[] array)Calculate the min of an array | 
| static double | getSum(double[] array)Calculate the total of an array | 
| static boolean | isContains(String[] set,
           String query)Test if a string occurs within a set | 
| static String | toString(double[] array)A simple toString method for an array of doubles. | 
| static String | toString(double[][] array)A simple toString method for an array of doubles. | 
| static String | toString(double[] array,
         int number)A simple toString method for an array of doubles. | 
| static String | toString(int[] array)A simple toString method for an array of ints. | 
| static String | toString(int[][] array)A simple toString method for an array of ints. | 
| static String | toString(int[] array,
         int number) | 
| static String | toString(Object[] array)A simple toString method for an array of doubles. | 
| static String | toString(Object[] array,
         int number)A simple toString method for an array of objects. | 
| static String | toString(Object[] array,
         String divider)A simple toString method for an array of objects. | 
| static String | toString(Object[] array,
         String divider,
         int number)A simple toString method for an array of objects. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public Utils()
| Method Detail | 
|---|
public static boolean isContains(String[] set,
                                 String query)
set - the set of stringsquery - the query string
public static double[] getCopy(double[] array)
public static double getSum(double[] array)
array - The array to sum up
public static double getMax(double[] array)
array - The array to check
public static double getMax(double[] array,
                            int start,
                            int end)
array - The array to checkstart - the first index to checkend - the index after the last index to check
public static double getMin(double[] array)
array - The array to check
public static double getMean(double[] array)
array - the values
public static double[] getCopy(double[] array,
                               int start,
                               int end)
public static double[] getCopy(double[] array,
                               int start)
public static byte[] getCopy(byte[] array)
array - the bytes to copy
public static String[] getCopy(String[] array)
array - the strings to copy
public static double[][] getCopy(double[][] array)
public static int[][] getCopy(int[][] matrix)
matrix - the matrix to clone
public static double[][][] getCopy(double[][][] array)
public static byte[][] getCopy(byte[][] array)
public static boolean[][] getCopy(boolean[][] array)
public static int[] getCopy(int[] array)
public static int[] getCopy(int[] array,
                            int startingIndex)
public static void copy(double[][] source,
                        double[][] dest)
public static String toString(double[] array,
                              int number)
number - number of elements to process starting from first element
public static String toString(Object[] array,
                              int number)
number - number of elements to process starting from first element
public static String toString(Object[] array,
                              String divider)
public static String toString(Object[] array,
                              String divider,
                              int number)
number - number of elements to process starting from first elementpublic static String toString(Object[] array)
public static String toString(double[] array)
public static String toString(int[] array)
public static String toString(int[] array,
                              int number)
public static String toString(double[][] array)
public static String toString(int[][] array)
public static int getArgmax(int[] array)
array - The array to examine
public static int getArgmax(double[] array)
array - The array to examine
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||