|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ode4j.cpp.internal.ApiCppMathMisc
public abstract class ApiCppMathMisc
miscellaneous math functions. these are mostly useful for testing
Constructor Summary | |
---|---|
ApiCppMathMisc()
|
Method Summary | |
---|---|
static void |
dClearUpperTriangle(double[] A,
int n)
clear the upper triangle of a square matrix |
static void |
dMakeRandomMatrix(double[] A,
int n,
int m,
double range)
make a random matrix with entries between +/- range. |
static void |
dMakeRandomVector(double[] A,
int n,
double range)
make a random vector with entries between +/- range. |
static double |
dMaxDifference(double[] A,
double[] B,
int n,
int m)
return the maximum element difference between the two n*m matrices |
static double |
dMaxDifferenceLowerTriangle(double[] A,
double[] B,
int n)
return the maximum element difference between the lower triangle of two n*n matrices |
static long |
dRand()
return next 32 bit random number. |
static long |
dRandGetSeed()
get and set the current random number seed. |
static int |
dRandInt(int n)
return a random integer between 0..n-1. |
static double |
dRandReal()
return a random real number between 0..1 |
static void |
dRandSetSeed(long s)
|
static boolean |
dTestRand()
return 1 if the random number generator is working. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ApiCppMathMisc()
Method Detail |
---|
public static boolean dTestRand()
public static long dRand()
public static long dRandGetSeed()
public static void dRandSetSeed(long s)
public static int dRandInt(int n)
public static double dRandReal()
public static void dMakeRandomVector(double[] A, int n, double range)
public static void dMakeRandomMatrix(double[] A, int n, int m, double range)
public static void dClearUpperTriangle(double[] A, int n)
public static double dMaxDifference(double[] A, double[] B, int n, int m)
public static double dMaxDifferenceLowerTriangle(double[] A, double[] B, int n)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |