Changeset 427 for library/tests
- Timestamp:
- 07/24/09 08:53:22 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
library/tests/square_mat_test.cpp
r426 r427 32 32 33 33 TMatrix sqmat(A); 34 CHECK_EQUAL(sz, sqmat.rows()); 35 CHECK_EQUAL(sz, sqmat.cols()); 36 34 37 mat res = sqmat.to_mat(); 35 38 CHECK_CLOSE(A, res, epsilon); … … 45 48 double d = det(A); 46 49 CHECK_CLOSE(log(d), sqmat.logdet(), epsilon); 50 51 double q = sqmat.qform(ones(sz)); 52 CHECK_CLOSE(sumsum(A), q, epsilon); 53 54 q = sqmat.qform(v); 55 double r = (A * v) * v; 56 CHECK_CLOSE(r, q, epsilon); 57 58 sqmat2 = sqmat; 59 sqmat2.clear(); 60 CHECK_EQUAL(0, sqmat2.qform(ones(sz))); 47 61 } 48 62