Changeset 2580 in Sophya for trunk/SophyaProg/Tests
- Timestamp:
- Jul 29, 2004, 5:10:44 PM (21 years ago)
- Location:
- trunk/SophyaProg/Tests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaProg/Tests/tsttmat.cc
r2322 r2580 111 111 //--------------------------------------------- 112 112 TMatrix<r_8> a(A,false); 113 cout<<endl<<"Matrices AAA *=C"<<endl;113 cout<<endl<<"Matrices AAA = AAA * C"<<endl; 114 114 {for(uint_4 i=0;i<AAA.NRows();i++) for(uint_4 j=0;j<C.NCols();j++) 115 115 {a(i,j) = 0; for(uint_4 k=0;k<AAA.NCols();k++) a(i,j) += AAA(i,k)*C(k,j);}} 116 AAA *=C;116 AAA = AAA * C; 117 117 cout<<"AAA:"<<endl<<AAA; 118 118 cout<<"a:"<<endl<<a; 119 119 TMatrix<r_8> b(B,false); 120 cout<<"Matrices BBB *=D"<<endl;120 cout<<"Matrices BBB = BBB * D"<<endl; 121 121 {for(uint_4 i=0;i<BBB.NRows();i++) for(uint_4 j=0;j<D.NCols();j++) 122 122 {b(i,j) = 0; for(uint_4 k=0;k<BBB.NCols();k++) b(i,j) += BBB(i,k)*D(k,j);}} 123 BBB *=D;123 BBB = BBB * D; 124 124 cout<<"B:"<<endl<<BBB; 125 125 cout<<"b:"<<endl<<b; … … 183 183 Matrix M(X); cout<<"Matrix M"<<endl<<M<<endl; 184 184 Matrix MI = Inverse(M); cout<<"MI"<<endl<<MI; 185 MI *=M; cout<<"MI*M"<<endl<<MI;185 MI = MI * M; cout<<"MI*M"<<endl<<MI; 186 186 r_8 xmin=-1.; 187 187 for(int i=0;i<10;i++) for(int j=0;j<10;j++) … … 198 198 Xinv = Inverse(X); 199 199 cout<<"TMatrix Xinv"<<endl<<Xinv; 200 Xinv *=X;201 cout<<"Xinv *=X"<<endl<<Xinv;200 Xinv = Xinv * X; 201 cout<<"Xinv = Xinv * X"<<endl<<Xinv; 202 202 r_8 xmin=-1.; 203 203 for(int i=0;i<10;i++) for(int j=0;j<10;j++) -
trunk/SophyaProg/Tests/tsttminv.cc
r2571 r2580 470 470 TMatrix< TYPE > AmUSVt(N,N); AmUSVt = U; 471 471 for(int i=0;i<N;i++) for(int j=0;j<N;j++) AmUSVt(i,j) *= S(j); 472 AmUSVt *=VT; AmUSVt -= Ainput;472 AmUSVt = AmUSVt * VT; AmUSVt -= Ainput; 473 473 if(nprline>0) {cout<<AmUSVt; cout<<endl;} 474 474 //-- Check … … 502 502 TMatrix< TYPE > AmUSVt(N,N); AmUSVt = U; 503 503 for(int i=0;i<N;i++) for(int j=0;j<N;j++) AmUSVt(i,j) *= (TYPE) S(j); 504 AmUSVt *=VT; AmUSVt -= Ainput;504 AmUSVt = AmUSVt * VT; AmUSVt -= Ainput; 505 505 if(nprline>0) {cout<<AmUSVt; cout<<endl;} 506 506 //-- Check
Note:
See TracChangeset
for help on using the changeset viewer.