|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--vis.util.Util
The Util class has a number of utility methods that are used in different beans.
| Constructor Summary | |
Util()
|
|
| Method Summary | |
static int[] |
colorToIntensity(int[] pixValue)
Converts RGB color values to its corresponding intensity values. |
static void |
computeHistogram(double[] data,
int maxbars,
int[] binCount,
double[] xMinmax,
int[] yMinmax)
Computes histogram. |
static void |
computeHistogram(int[] data,
int maxbars,
int[] binCount,
int[] xMinmax,
int[] yMinmax)
Computes histogram. |
static HistoData |
computeHistogram(java.lang.Object dataObj,
int maxbars)
Computes histogram. |
static double[][] |
convertToDouble(java.lang.Object obj)
Converts a 2 dimensional array of any type to a 2 dimensional array of of double. |
static java.lang.String[][] |
convertToString(java.lang.Object obj)
Converts a 2 dimensional array object of any type to a 2 dimensional string array. |
static int[] |
getArrayDimension(java.lang.Object obj)
Gets the dimesions of a generic 2 dimensional array. |
static int[] |
getDegrees(java.lang.Object obj)
Converts an input array into an array of angles. |
static int |
getDiff(java.lang.Object obj,
java.lang.Object minmax,
int index,
double scale)
Computes the difference between the value at a given index of the input array and the minimum value, i.e.; diff = (inp[index] - min)*scale. |
static java.lang.String |
getInBetString(java.lang.Object obj,
double val)
Computes the absolute inbetween value and returns it as a string. |
static int |
getLength(java.lang.Object obj)
Gets the size of a generic array. |
static double[] |
getMinMax(double[] inp)
Computes minimun and maximum of the values in an array. |
static int[] |
getMinMax(int[] inp)
Computes minimun and maximum of the values in a given array. |
static long[] |
getMinMax(long[] inp)
Computes minimum and maximum values of an array. |
static java.lang.Object |
getMinMax(java.lang.Object inp)
Computes minimun and maximum values of an array. |
static java.lang.Object |
getMinMax(java.lang.Object[] inparray)
|
static java.lang.Object |
getMinMax(java.lang.Object inp,
int percentage)
Computes minimun and maximum values of an array. |
static short[] |
getMinMax(short[] inp)
Computes minimum and maximum values of an array. |
static double |
getRange(java.lang.Object obj)
Computes the range (maximum - minimum) from a minmax array which can be generic. |
static java.lang.String |
maxString(java.lang.Object obj)
Returns the maximum value as a string from a minmax array. |
static java.lang.String[] |
toString(java.lang.Object obj)
Converts an one dimensional array of numbers into an array of corresponding string values. |
static double |
trunc(double db)
Truncates a double value to the 2nd decimal precison. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Util()
| Method Detail |
public static HistoData computeHistogram(java.lang.Object dataObj,
int maxbars)
data - the input data array whose elements can be of any Java primitive types.maxbars - the maximum number of bars in the histogram.
public static void computeHistogram(int[] data,
int maxbars,
int[] binCount,
int[] xMinmax,
int[] yMinmax)
data - the input data array.maxbars - the maximum number of bars in the histogram.binCount - the array of frequency count.xMinMax - an array of size 2 which holds minimum and maximum of X axis values.yMinMax - an array of size 2 which holds minimum and maximum of Y values.
public static java.lang.Object getMinMax(java.lang.Object inp,
int percentage)
inp - the input array as an Object.public static java.lang.Object getMinMax(java.lang.Object inp)
inp - the input array as an Object.public static java.lang.Object getMinMax(java.lang.Object[] inparray)
public static void computeHistogram(double[] data,
int maxbars,
int[] binCount,
double[] xMinmax,
int[] yMinmax)
data - the input data array as an Object.maxbars - the maximum number of bars.binCount - an array of bin count.xMinmax - an array of size 2 which holds the
minimum and maximum of X axis values.yMinmax - an array of size 2 which holds the
minimum and maximum of Y axis values.public static int[] getMinMax(int[] inp)
inp - the input array.public static double[] getMinMax(double[] inp)
inp - the input array.public static short[] getMinMax(short[] inp)
inp - a one dimensional array.public static long[] getMinMax(long[] inp)
inp - a one dimensional array.public static int[] colorToIntensity(int[] pixValue)
pixValue - an array of color pixel values.public static java.lang.String[] toString(java.lang.Object obj)
obj - an array of Java primitive type as an Object.public static java.lang.String maxString(java.lang.Object obj)
obj - an array of size 2 representing the min and mx values.
public static java.lang.String getInBetString(java.lang.Object obj,
double val)
obj - the minmax array i.e.; an array of size 2 in which minmax[0]
is the maximum value and minmax[1] as the minimum value.val - the inbetween value relative to the minimum value.public static double getRange(java.lang.Object obj)
obj - a one dimensional array of size 2 of Java primitive types as an Object.public static double trunc(double db)
db - the double value.public static int getLength(java.lang.Object obj)
obj - an array of Java primitive types.public static int[] getArrayDimension(java.lang.Object obj)
obj - the input array which can be of any primitive type.public static double[][] convertToDouble(java.lang.Object obj)
obj - a 2 dimensional array as an Object.public static java.lang.String[][] convertToString(java.lang.Object obj)
obj - a 2 dimensional array as an Object.
public static int getDiff(java.lang.Object obj,
java.lang.Object minmax,
int index,
double scale)
obj - a one dimensional array of any primitive data type.minmax - an array of size 2 that represents the minimum and maximum
values.index - the index in the input array.scale - the scaling factor.public static int[] getDegrees(java.lang.Object obj)
obj - a one dimensional array of Java primitive data types.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||