expm testing and fixes.

This commit is contained in:
jgoppert
2015-11-05 15:39:41 -05:00
parent 5517532c90
commit 5566b3dc77
7 changed files with 93 additions and 27 deletions
+9 -3
View File
@@ -12,12 +12,18 @@ template class SquareMatrix<float, n_large>;
int main()
{
float data[9] = {1, 0, 0, 0, 1, 0, 1, 0, 1};
float data[9] = {1, 2, 3,
4, 5, 6,
7, 8, 10};
float data_check[9] = {-0.66666667f, -1.33333333f, 1. ,
-0.66666667f, 3.66666667f, -2. ,
1. , -2. , 1. };
SquareMatrix<float, 3> A(data);
SquareMatrix<float, 3> A_I = A.inverse();
float data_check[9] = {1, 0, 0, 0, 1, 0, -1, 0, 1};
SquareMatrix<float, 3> A_I_check(data_check);
(void)A_I;
A_I.print();
A_I_check.print();
assert(A_I == A_I_check);
// stess test