|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuchicago.src.sim.util.SimUtilities
public class SimUtilities
Static Utility methods for RePast simulations.
| Field Summary | |
|---|---|
static java.lang.String |
newLine
|
| Method Summary | |
|---|---|
static java.lang.String |
capitalize(java.lang.String str)
Captializes the specified String. |
static java.io.File |
getDataFile(java.lang.String filename)
Gets a file based on a certain name. |
static java.lang.String |
getDataFileName(java.lang.String filename)
Gets a filename based on a certain name. |
static double[] |
getPointFromHeadingAndDistance(int heading,
int distance)
Gets an x, y coordinate as a double[] of length 2, given a heading (0-359) and a distance. |
static void |
logException(java.lang.String msg,
java.lang.Exception ex)
Logs the specified message and exception to . |
static int |
norm(int val,
int size)
Normalize the specified value to the specified size |
static void |
showError(java.lang.String msg,
java.lang.Exception ex)
Displays an error message on the screen and prints the message and the exception message and stack trace to a . |
static void |
showMessage(java.lang.String msg)
Displays a message in a dialog box. |
static void |
shuffle(double[] array,
cern.jet.random.Uniform rng)
Shuffles the specified double[] using the specifid Uniform rng. |
static void |
shuffle(java.util.List list)
Shuffles the specified list using Random.uniform. |
static void |
shuffle(java.util.List list,
cern.jet.random.Uniform rng)
Shuffles the specified list using the specifid Uniform rng. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String newLine
| Method Detail |
|---|
public static java.lang.String capitalize(java.lang.String str)
str - the String to capitalize.
public static java.io.File getDataFile(java.lang.String filename)
filename - the name of the file to get
public static java.lang.String getDataFileName(java.lang.String filename)
filename - the name of the file to get
public static void shuffle(java.util.List list)
list - the list to shuffleRandom
public static void shuffle(java.util.List list,
cern.jet.random.Uniform rng)
list - the List to shufflerng - the random number generator to use for
the shuffle
public static void shuffle(double[] array,
cern.jet.random.Uniform rng)
array - the double[] to shufflerng - the random number generator to use for
the shuffle
public static double[] getPointFromHeadingAndDistance(int heading,
int distance)
heading - the heading in degreesdistance - the distance to travel along the heading
public static int norm(int val,
int size)
val - the value to normalizesize - the size to normalize the value to
public static void showMessage(java.lang.String msg)
public static void showError(java.lang.String msg,
java.lang.Exception ex)
public static void logException(java.lang.String msg,
java.lang.Exception ex)
msg - the message to logex - the exception to log
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||