PIMathMatrix add trace, assert for non square matrix, assert in operator *
This commit is contained in:
@@ -355,12 +355,6 @@ TEST(PIMathMatrix_Test, determinantIfSquare) {
|
||||
ASSERT_DOUBLE_EQ(d, i);
|
||||
}
|
||||
|
||||
TEST(PIMathMatrix_Test, determinantIfNotSquare) {
|
||||
PIMathMatrix<double> matrix(3, 5, 1.0);
|
||||
matrix.element(1,1) = 5.0;
|
||||
ASSERT_FALSE(matrix.determinant());
|
||||
}
|
||||
|
||||
TEST(PIMathMatrix_Test, trace) {
|
||||
PIMathMatrix<double> matrix(3, 3, 0.0);
|
||||
double t;
|
||||
@@ -383,12 +377,6 @@ TEST(PIMathMatrix_Test, trace) {
|
||||
ASSERT_DOUBLE_EQ(t, i);
|
||||
}
|
||||
|
||||
TEST(PIMathMatrix_Test, traceIfNotSquare) {
|
||||
PIMathMatrix<double> matrix(3, 5, 1.0);
|
||||
matrix.element(1,1) = 5.0;
|
||||
ASSERT_FALSE(matrix.trace());
|
||||
}
|
||||
|
||||
TEST(PIMathMatrix_Test, toUpperTriangular) {
|
||||
PIMathMatrix<double> matrix(3, 3, 0.0);
|
||||
double d1, d2 = 1;
|
||||
|
||||
@@ -356,20 +356,6 @@ TEST(PIMathMatrixT_Test, determinantIfSquare) {
|
||||
ASSERT_DOUBLE_EQ(i, d);
|
||||
}
|
||||
|
||||
TEST(PIMathMatrixT_Test, determinantIfNotSquare) {
|
||||
PIMathMatrixT<rows, 5u, double> matr;
|
||||
matr.element(0,0) = 3;
|
||||
matr.element(0,1) = 6;
|
||||
matr.element(0,2) = 8;
|
||||
matr.element(1,0) = 2;
|
||||
matr.element(1,1) = 1;
|
||||
matr.element(1,2) = 4;
|
||||
matr.element(2,0) = 6;
|
||||
matr.element(2,1) = 2;
|
||||
matr.element(2,2) = 5;
|
||||
ASSERT_FALSE(matr.determinant());
|
||||
}
|
||||
|
||||
TEST(PIMathMatrixT_Test, invert) {
|
||||
PIMathMatrixT<rows, cols, double> matrix1;
|
||||
PIMathMatrixT<rows, cols, double> matrix2;
|
||||
|
||||
Reference in New Issue
Block a user