public abstract class TestingTools
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static double |
DELTA
delta for error margins
|
Constructor and Description |
---|
TestingTools() |
Modifier and Type | Method and Description |
---|---|
static void |
assertEqualElementWise(SimpleMatrix M1,
SimpleMatrix M2,
double delta)
own assert for matrices
|
static void |
assertEqualElementWise(SimpleVector v1,
SimpleVector v2,
double delta)
own assert for vectors
|
static double |
rand(double min,
double max)
Randomly generates , i.e.
|
static int |
rand(int min,
int max)
Randomly generates , i.e.
|
static double |
randAng()
Randomly generates , i.e.
|
static SimpleMatrix |
randLowerTriangularMatrix(int rows,
int cols)
Randomly generates a lower-triangular matrix of the given size.
|
static SimpleMatrix |
randMatrix(int rows,
int cols)
Randomly generates a matrix of the given size.
|
static SimpleMatrix |
randMatrixNonSingular(int size)
Randomly generates a matrix of the given size which is not singular.
|
static double |
randNegative()
Randomly generates , i.e.
|
static double |
randNonNegative()
Randomly generates a non-negative number, i.e.
|
static double |
randNonPositive()
Randomly generates , i.e.
|
static double |
randNonZero()
Randomly generates , i.e.
|
static double |
randNotPmOne()
Randomly generates a number in [-2.0, 2.0) but not +1.0 or -1.0, i.e.
|
static SimpleMatrix |
randOrthogonalMatrix(int size)
Randomly generates an orthogonal matrix of the given size, i.e.
|
static double |
randPmOne()
Randomly generates either +1.0 or -1.0, i.e.
|
static double |
randPositive()
Randomly generates , i.e.
|
static SimpleMatrix |
randRotationMatrix2D()
Randomly generates a 2x2 rotation matrix (representing a 2D rotation).
|
static SimpleMatrix |
randRotationMatrix3D()
Randomly generates a 3x3 rotation matrix (representing a 3D rotation).
|
static SimpleMatrix |
randSpecialOrthogonalMatrix(int size)
Randomly generates an special orthogonal matrix of the given size, i.e.
|
static SimpleMatrix |
randUpperTriangularMatrix(int rows,
int cols)
Randomly generates an upper-triangular matrix of the given size.
|
static SimpleVector |
randVector(int len)
Randomly generates a vector of the given length.
|
public static final void assertEqualElementWise(SimpleMatrix M1, SimpleMatrix M2, double delta)
public static final void assertEqualElementWise(SimpleVector v1, SimpleVector v2, double delta)
public static final double randPmOne()
public static final double randNotPmOne()
public static final double randNonNegative()
public static final double randPositive()
public static final double randNonPositive()
public static final double randNegative()
public static final double randNonZero()
public static final double rand(double min, double max)
public static final int rand(int min, int max)
public static final double randAng()
public static final SimpleVector randVector(int len)
public static final SimpleMatrix randMatrix(int rows, int cols)
public static final SimpleMatrix randMatrixNonSingular(int size)
public static final SimpleMatrix randRotationMatrix2D()
public static final SimpleMatrix randRotationMatrix3D()
public static final SimpleMatrix randOrthogonalMatrix(int size)
public static final SimpleMatrix randSpecialOrthogonalMatrix(int size)
public static final SimpleMatrix randUpperTriangularMatrix(int rows, int cols)
public static final SimpleMatrix randLowerTriangularMatrix(int rows, int cols)