|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--Utilities
Utilities is here for helpful stuff, like a random variable, and a random vector generator. All of the ideologies, tags, and positions are created randomly here.
| Field Summary | |
static long[][] |
Pascal
Pascal's triangle up to row 41 for use in tag visualization |
static java.util.Random |
rand
Gives us an random number generator to work with |
| Constructor Summary | |
Utilities()
|
|
| Method Summary | |
static long[][] |
buildPascal(int N)
Computes Pascal's triangle up to the number N |
static double |
Sigmoid(double x)
Computes the sigmoid function on a given input. |
static int[] |
vectorConsist(int size,
int modparam)
Creates a vector with values within the bounds of the modparam that has consistent values around the value c. |
static int[] |
vectorConsist(int size,
int modparam,
int c)
Creates a vector with values within the bounds of the modparam that has consistent values around the value c. |
static double[] |
vectorRand(int size)
Creates a randomized double array |
static int[] |
vectorRand(int size,
int modparam)
Creates a positive randomized int array |
static int[] |
vectorRand(int size,
int modparam,
int c)
Creates a positive randomized int array around a center int |
static void |
waitHere(java.lang.String msg)
Pauses the program until the user hits a key |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
public static java.util.Random rand
public static long[][] Pascal
| Constructor Detail |
public Utilities()
| Method Detail |
public static int[] vectorRand(int size,
int modparam)
size - the size of the array neededmodparam - the number of possible values
public static int[] vectorRand(int size,
int modparam,
int c)
size - the size of the array neededmodparam - the number of possible valuesc - the center of the arraypublic static double[] vectorRand(int size)
size - the size of the array needed
public static int[] vectorConsist(int size,
int modparam)
size - the size of the array neededmodparam - the number of possible values
public static int[] vectorConsist(int size,
int modparam,
int c)
size - the size of the array neededmodparam - the number of possible valuesc - the center of the arraypublic static double Sigmoid(double x)
x - the number for sigmoid calculationpublic static long[][] buildPascal(int N)
N - the depth of the trianglepublic static void waitHere(java.lang.String msg)
msg - a meaningless String for the keystroke
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||