|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.cmu.cs.sb.core.Util
public class Util
Class of static utility functions and static variables
Field Summary | |
---|---|
static javax.swing.JFileChooser |
theChooser
Common chooser object, used across classes so will remember the path |
Constructor Summary | |
---|---|
Util()
|
Method Summary | |
---|---|
static double |
correlation(double[] xvalues,
double[] yvalues)
Computes the correlation coefficient on the arrays xvalues and yvalues |
static double |
correlation(double[] xvalues,
double[] yvalues,
int[] include)
Computes correlation coefficient between xvalues and yvalues only for those that have non-zero includex and includey values Returns 0 if no values are agree on for all data |
static double |
correlation(double[] xvalues,
double[] yvalues,
int[] includex,
int[] includey)
Computes correlation coefficient between xvalues and yvalues only for those that have non-zero includex and includey values Returns 0 if no values are agree on for all data |
static javax.swing.ImageIcon |
createImageIcon(java.lang.String path)
Returns an ImageIcon, or null if the path was invalid. |
static double |
distortion(double[] xvalues,
double[] yvalues,
int[] include)
Returns the sum of the squared difference of xvalues and yvalues for non-zero include index values |
static java.lang.String |
doubleToSz(double dval)
Converts double into a formatted string representation |
static double |
euclidean(double[] xvalues,
double[] yvalues,
int[] include)
Returns the euclidean distance between xvalues and yvalues for those include values that are non-zero. |
static java.net.URL |
getImageURL(java.lang.String path)
Returns an URL for the path, or null if the path was invalid. |
static double |
getmedian(double[] vals,
int nvalindex)
Returns the median value in vals in indicies between 0 and nvalindex-1 |
static double |
removeUnits(java.lang.String szvalunits)
Removes units after last digit Throws an IllegalArgumentException if no digits in szvalunits |
static void |
renderDialog(javax.swing.JDialog thedialog,
java.lang.String szMessage,
int noffsetx,
int noffsety)
Calls renderDialog with Help in the title window for a dialog |
static void |
renderDialog(javax.swing.JDialog thedialog,
java.lang.String szMessage,
int noffsetx,
int noffsety,
java.lang.String szTitle)
Renders a dialog window with szMessage attached to thedialog at location (noffsetx,noffsety) with title szTtitle |
static void |
renderDialog(javax.swing.JFrame theframe,
java.lang.String szMessage)
Calls renderDialog with an offset X value of 25 and an offset Y value of 10 |
static void |
renderDialog(javax.swing.JFrame theframe,
java.lang.String szMessage,
int noffsetx,
int noffsety)
Calls renderDialog with Help in the title window for a JFrame |
static void |
renderDialog(javax.swing.JFrame theframe,
java.lang.String szMessage,
int noffsetx,
int noffsety,
java.lang.String szTitle)
Renders a dialog window with szMessage attached to theframe at location (noffsetx,noffsety) with title szTtitle |
static int |
romanToNumeric(java.lang.String roman)
function coverts roman numeral strings to integers up to 89. |
static java.lang.String |
stripLastExtension(java.lang.String szinput)
Returns a string that has the last period and everything after it removed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static javax.swing.JFileChooser theChooser
Constructor Detail |
---|
public Util()
Method Detail |
---|
public static java.lang.String stripLastExtension(java.lang.String szinput)
public static int romanToNumeric(java.lang.String roman)
public static double removeUnits(java.lang.String szvalunits)
public static java.lang.String doubleToSz(double dval)
public static javax.swing.ImageIcon createImageIcon(java.lang.String path)
public static java.net.URL getImageURL(java.lang.String path)
public static void renderDialog(javax.swing.JDialog thedialog, java.lang.String szMessage, int noffsetx, int noffsety)
public static void renderDialog(javax.swing.JFrame theframe, java.lang.String szMessage, int noffsetx, int noffsety)
public static void renderDialog(javax.swing.JDialog thedialog, java.lang.String szMessage, int noffsetx, int noffsety, java.lang.String szTitle)
public static void renderDialog(javax.swing.JFrame theframe, java.lang.String szMessage)
public static void renderDialog(javax.swing.JFrame theframe, java.lang.String szMessage, int noffsetx, int noffsety, java.lang.String szTitle)
public static double correlation(double[] xvalues, double[] yvalues)
public static double correlation(double[] xvalues, double[] yvalues, int[] include)
public static double correlation(double[] xvalues, double[] yvalues, int[] includex, int[] includey)
public static double euclidean(double[] xvalues, double[] yvalues, int[] include)
public static double distortion(double[] xvalues, double[] yvalues, int[] include)
public static double getmedian(double[] vals, int nvalindex)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |