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

Comparing trunk/OOPSE-4/test/math/SquareMatrix3TestCase.cpp (file contents):
Revision 1606 by tim, Tue Oct 19 23:01:03 2004 UTC vs.
Revision 1616 by tim, Wed Oct 20 18:07:08 2004 UTC

# Line 140 | Line 140 | void SquareMatrix3TestCase::testTransformation(){
140  
141      //test diagonalize
142  
143 <    RotMat3x3d m4;
143 >    RotMat3x3d m4;    
144      RotMat3x3d a;
145      Vector3d w;
146 <    RotMat3x3d v;
147 <    m4(0,0) = 1.0;
148 <    m4(0,1) = 5.0;
149 <    m4(0,2) = 3.0;
150 <    m4(1,0) = 3.0;
151 <    m4(1,1) = 1.0;
152 <    m4(1,2) = 2.0;
153 <    m4(2,0) = 0.0;
154 <    m4(2,1) = -21.0;
155 <    m4(2,2) = -81.0;
156 <    m4.diagonalize(a, w, v);
146 >    RotMat3x3d m5L;
147 >    RotMat3x3d m5R;
148 >    m4(0, 0) = 3.0;
149 >    m4(0, 1) = 4.0;
150 >    m4(0, 2) = 5.0;
151 >    m4(1, 0) = 4.0;
152 >    m4(1, 1) = 5.0;
153 >    m4(1, 2) = 6.0;    
154 >    m4(2, 0) = 5.0;
155 >    m4(2, 1) = 6.0;
156 >    m4(2, 2) = 7.0;
157 >    a = m4;
158 >    
159 >    RotMat3x3d::diagonalize(a, w, m5L);
160  
161 <    std::cout << std::endl;
162 <    std::cout << a << std::endl;    
161 >    m5R(0, 0) = 0.789067 ;
162 >    m5R(0, 1) = -0.408248;
163 >    m5R(0, 2) = 0.459028;
164 >    m5R(1, 0) = 0.090750;
165 >    m5R(1, 1) = 0.816497;
166 >    m5R(1, 2) = 0.570173;    
167 >    m5R(2, 0) = -0.607567;
168 >    m5R(2, 1) = -0.408248 ;
169 >    m5R(2, 2) = 0.681319;
170  
171 <    std::cout << std::endl;
162 <    std::cout << w << std::endl;    
163 <
164 <    std::cout << std::endl;
165 <    std::cout << v << std::endl;    
166 <
171 >    CPPUNIT_ASSERT(m5L == m5R);
172   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines