ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-3.0/test/math/SquareMatrixTestCase.cpp
(Generate patch)

Comparing trunk/OOPSE-3.0/test/math/SquareMatrixTestCase.cpp (file contents):
Revision 1571 by tim, Fri Oct 15 15:19:28 2004 UTC vs.
Revision 1616 by tim, Wed Oct 20 18:07:08 2004 UTC

# Line 55 | Line 55 | void SquareMatrixTestCase::testInverse() {
55      CPPUNIT_ASSERT(SMat3x3::identity() == identMat);
56   }
57  
58 void SquareMatrixTestCase::testInverse() {
58  
59 < }
59 > void SquareMatrixTestCase::testJacobi() {
60 >    SMat3x3 a;
61 >    Vector<double, 3> w1L;
62 >    Vector<double, 3> w1R;    
63 >    SMat3x3 v;
64 >    a(0, 0) = 3.0;
65 >    a(0, 1) = 4.0;
66 >    a(0, 2) = 5.0;
67 >    a(1, 0) = 4.0;
68 >    a(1, 1) = 5.0;
69 >    a(1, 2) = 6.0;    
70 >    a(2, 0) = 5.0;
71 >    a(2, 1) = 6.0;
72 >    a(2, 2) = 7.0;  
73  
74 < void SquareMatrixTestCase::testDeterminant() {
74 >    w1R[0] = 15.3899;
75 >    w1R[1] = 0.0;
76 >    w1R[2] = -0.389867;
77 >    
78 >    SMat3x3::jacobi(a, w1L, v);
79  
80 +    CPPUNIT_ASSERT_DOUBLES_EQUAL(w1L[0], w1R[0], 0.0001);
81 +    CPPUNIT_ASSERT_DOUBLES_EQUAL(w1L[1], w1R[1], oopse::epsilon);
82 +    CPPUNIT_ASSERT_DOUBLES_EQUAL(w1L[2], w1R[2], oopse::epsilon);
83 +
84   }
85  
86   void SquareMatrixTestCase::testTrace() {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines