Changeset 1112 in Sophya for trunk/SophyaProg/Tests/tsttmat.cc
- Timestamp:
- Jul 28, 2000, 6:34:00 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaProg/Tests/tsttmat.cc
r857 r1112 112 112 TMatrix<r_8> a(A,false); 113 113 cout<<endl<<"Matrices AAA*=C"<<endl; 114 {for( int i=0;i<AAA.NRows();i++) for(intj=0;j<C.NCols();j++)115 {a(i,j) = 0; for( intk=0;k<AAA.NCols();k++) a(i,j) += AAA(i,k)*C(k,j);}}114 {for(uint_4 i=0;i<AAA.NRows();i++) for(uint_4 j=0;j<C.NCols();j++) 115 {a(i,j) = 0; for(uint_4 k=0;k<AAA.NCols();k++) a(i,j) += AAA(i,k)*C(k,j);}} 116 116 AAA *= C; 117 117 cout<<"AAA:"<<endl<<AAA; … … 119 119 TMatrix<r_8> b(B,false); 120 120 cout<<"Matrices BBB*=D"<<endl; 121 {for( int i=0;i<BBB.NRows();i++) for(intj=0;j<D.NCols();j++)122 {b(i,j) = 0; for( intk=0;k<BBB.NCols();k++) b(i,j) += BBB(i,k)*D(k,j);}}121 {for(uint_4 i=0;i<BBB.NRows();i++) for(uint_4 j=0;j<D.NCols();j++) 122 {b(i,j) = 0; for(uint_4 k=0;k<BBB.NCols();k++) b(i,j) += BBB(i,k)*D(k,j);}} 123 123 BBB *= D; 124 124 cout<<"B:"<<endl<<BBB; … … 158 158 //----------------------------------------------- 159 159 TMatrix<r_8> RR(2,4); 160 {for( int i=0;i<A.NRows();i++) for(intj=0;j<E.NCols();j++)161 {RR(i,j) = 0; for( intk=0;k<A.NCols();k++) RR(i,j) += A(i,k)*E(k,j);}}160 {for(uint_4 i=0;i<A.NRows();i++) for(uint_4 j=0;j<E.NCols();j++) 161 {RR(i,j) = 0; for(uint_4 k=0;k<A.NCols();k++) RR(i,j) += A(i,k)*E(k,j);}} 162 162 cout<<endl<<"Matrices R = A * E"<<endl; 163 163 R = A * E;
Note:
See TracChangeset
for help on using the changeset viewer.