uk.ac.ic.doc.automed.util
Class NumberToolkit

java.lang.Object
  extended by uk.ac.ic.doc.automed.util.NumberToolkit

public class NumberToolkit
extends java.lang.Object

NumberToolkit.java Deals with number manipulation

Author:
Duc M Le dmle@doc.ic.ac.uk

Method Summary
static AutoMedType[][] createAutoMedNumberRanges(int min, int max, int numEqualRanges)
          Devide an integer range into an equal number of disjoint, equal-sized sub-ranges
static int[][] createNumberRanges(int min, int max, int numEqualRanges)
          Devide an integer range into an equal number of disjoint, equal-sized sub-ranges
static java.lang.String getBitString(int val)
          Get the bit string of an integer value
static int[][] toIntegerArray(AutoMedType[][] arr)
          Convert a 2-dimensional AutoMedIntegerType array to integer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getBitString

public static java.lang.String getBitString(int val)
Get the bit string of an integer value


createNumberRanges

public static int[][] createNumberRanges(int min,
                                         int max,
                                         int numEqualRanges)
Devide an integer range into an equal number of disjoint, equal-sized sub-ranges

Returns:
int[][] a two dimensional array with 1st dimension containing low
values and 2nd dimension containing high values

createAutoMedNumberRanges

public static AutoMedType[][] createAutoMedNumberRanges(int min,
                                                        int max,
                                                        int numEqualRanges)
Devide an integer range into an equal number of disjoint, equal-sized sub-ranges

Returns:
AutoMedType[][] a two dimensional array with 1st dimension containing low
values and 2nd dimension containing high values

toIntegerArray

public static int[][] toIntegerArray(AutoMedType[][] arr)
Convert a 2-dimensional AutoMedIntegerType array to integer