public static class RX.Test
extends java.lang.Object
Unit tests, invoked by RX.main(java.lang.String[])
.
Modifier and Type | Field and Description |
---|---|
(package private) double[][] |
dEMdQA |
(package private) double[][] |
dEMdQN |
(package private) double[][] |
dQdEMA |
(package private) double[][] |
dQdEMN |
(package private) double[][] |
dRdEMA |
(package private) double[][] |
dRdEMN |
(package private) double[][] |
dRdQA |
(package private) double[][] |
dRdQN |
(package private) double[] |
mA |
(package private) float[] |
mAF |
(package private) double[] |
mB |
(package private) double[] |
mTA |
(package private) double[] |
mTB |
(package private) RX |
rxA |
(package private) RX |
rxB |
(package private) RX |
rxTA |
(package private) RX |
rxTB |
Constructor and Description |
---|
RX.Test() |
Modifier and Type | Method and Description |
---|---|
(package private) boolean |
checkXPend(java.lang.String msg)
Verify the result of an xpend operation in
testImpl() . |
static boolean |
epsilonEquals(double[][] m0,
double[][] m1,
double eps)
compare two dimensional matrices
|
(package private) void |
fail(java.lang.String msg)
print an error message and abort
|
(package private) boolean |
failSubtest(java.lang.String msg)
print an error message and return false
|
void |
main(java.lang.String[] arg)
First does some special case tests, then runs many randomized
test(boolean) until one fails. |
static boolean |
relativeEquals(double[][] m0,
double[][] m1,
double eps)
compare two dimensional matrices
|
(package private) boolean |
test(boolean aShouldBeIdentity)
|
(package private) boolean |
testImpl()
Impl of
test(boolean) . |
(package private) boolean |
testPartials()
test partial derivative algorithms against each other
|
RX rxA
RX rxB
RX rxTA
RX rxTB
double[] mA
double[] mB
double[] mTA
double[] mTB
float[] mAF
double[][] dQdEMN
double[][] dQdEMA
double[][] dEMdQN
double[][] dEMdQA
double[][] dRdQN
double[][] dRdQA
double[][] dRdEMN
double[][] dRdEMA
public void main(java.lang.String[] arg)
First does some special case tests, then runs many randomized test(boolean)
until one fails.
boolean test(boolean aShouldBeIdentity)
Run a set of tests with inputs rxA
and rxB
, trying
all combinations of flipped and unflipped quaternions.
aShouldBeIdentity
- if true then rxA should be identity, otherwise
rxA may be anythingboolean testPartials()
boolean testImpl()
Impl of test(boolean)
.
boolean checkXPend(java.lang.String msg)
Verify the result of an xpend operation in testImpl()
.
Converts rxTB from mTB, and compares result with rxTA.
public static boolean epsilonEquals(double[][] m0, double[][] m1, double eps)
public static boolean relativeEquals(double[][] m0, double[][] m1, double eps)
void fail(java.lang.String msg)
boolean failSubtest(java.lang.String msg)