|
RePast v. 2.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--uchicago.src.sim.util.SimUtilities
Static Utility methods for RePast simulations.
| Method Summary | |
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(String msg,
Exception ex)
Logs the specified message and exception to ./repast.log. |
static int |
norm(int val,
int size)
Normalize the specified value to the specified size |
static void |
showError(String msg,
Exception ex)
Displays an error message on the screen and prints the message and the exception message and stack trace to a ./repast_error.log |
static void |
showMessage(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(List list)
Shuffles the specified list using Random.uniform. |
static void |
shuffle(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 |
| Method Detail |
public static void shuffle(List list)
list - the list to shuffleRandom
public static void shuffle(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(String msg)
public static void showError(String msg,
Exception ex)
public static void logException(String msg,
Exception ex)
msg - the message to logex - the exception to log
|
RePast v. 2.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||