|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.simbrain.util.SimbrainMath
public class SimbrainMath
SimbrainMath is the math functions used in simbrain.
| Constructor Summary | |
|---|---|
SimbrainMath()
|
|
| Method Summary | |
|---|---|
static void |
addNoise(double[] vector,
double noiselevel)
Add noise to an vector. |
static double[] |
addVector(double[] base,
double[] add)
Add these vectors. |
static int |
distance(Point src,
Point tar)
Calculates the Euclidean distance between two points. |
static double |
getAverage(double[] vals)
Helper function for computing mean values of an array of doubles. |
static double |
getMaximum(double[] theVec)
Finds the largest value in a vector array. |
static double |
inverf(double p)
Calculates the inverse of the error function. |
static double[] |
max(double[] one,
double[] two)
Finds the larger of two numbers. |
static int |
max(int one,
int two)
Return the greater of two integers. |
static double[] |
multVector(double[] theVec,
double mult)
Finds the vector multiple. |
static void |
printVector(double[] da)
Prints out the vector list. |
static double[] |
zeroVector(int size)
Set an array of doubles to zero. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimbrainMath()
| Method Detail |
|---|
public static int distance(Point src,
Point tar)
src - source pointtar - target point
public static double[] zeroVector(int size)
size - size of array
public static double[] multVector(double[] theVec,
double mult)
theVec - Vecotrmult - Multiple
public static int max(int one,
int two)
one - first inttwo - second int
public static double[] max(double[] one,
double[] two)
one - First numbertwo - Second number
public static double[] addVector(double[] base,
double[] add)
base - Base numberadd - Number to be added to base number
public static double getAverage(double[] vals)
vals - an array of values
public static void printVector(double[] da)
da - Vector listpublic static double inverf(double p)
p - Parameter to find inverse of the error
public static double getMaximum(double[] theVec)
theVec - Vector array
public static void addNoise(double[] vector,
double noiselevel)
vector - vector to which noise should be addednoiselevel - Noise level
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||