Changeset 2580 in Sophya for trunk/SophyaProg


Ignore:
Timestamp:
Jul 29, 2004, 5:10:44 PM (21 years ago)
Author:
cmv
Message:

plus de *= pour multipl matrice inplace rz+cmv 29/07/04

Location:
trunk/SophyaProg/Tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaProg/Tests/tsttmat.cc

    r2322 r2580  
    111111//---------------------------------------------
    112112TMatrix<r_8> a(A,false);
    113 cout<<endl<<"Matrices AAA*=C"<<endl;
     113cout<<endl<<"Matrices AAA = AAA * C"<<endl;
    114114{for(uint_4 i=0;i<AAA.NRows();i++) for(uint_4 j=0;j<C.NCols();j++)
    115115  {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;
     116AAA = AAA * C;
    117117cout<<"AAA:"<<endl<<AAA;
    118118cout<<"a:"<<endl<<a;
    119119TMatrix<r_8> b(B,false);
    120 cout<<"Matrices BBB*=D"<<endl;
     120cout<<"Matrices BBB = BBB * D"<<endl;
    121121{for(uint_4 i=0;i<BBB.NRows();i++) for(uint_4 j=0;j<D.NCols();j++)
    122122  {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;
     123BBB = BBB * D;
    124124cout<<"B:"<<endl<<BBB;
    125125cout<<"b:"<<endl<<b;
     
    183183Matrix M(X); cout<<"Matrix M"<<endl<<M<<endl;
    184184Matrix MI = Inverse(M); cout<<"MI"<<endl<<MI;
    185 MI *= M; cout<<"MI*M"<<endl<<MI;
     185MI = MI * M; cout<<"MI*M"<<endl<<MI;
    186186r_8 xmin=-1.;
    187187for(int i=0;i<10;i++) for(int j=0;j<10;j++)
     
    198198Xinv = Inverse(X);
    199199cout<<"TMatrix Xinv"<<endl<<Xinv;
    200 Xinv *= X;
    201 cout<<"Xinv *= X"<<endl<<Xinv;
     200Xinv = Xinv * X;
     201cout<<"Xinv = Xinv * X"<<endl<<Xinv;
    202202r_8 xmin=-1.;
    203203for(int i=0;i<10;i++) for(int j=0;j<10;j++)
  • trunk/SophyaProg/Tests/tsttminv.cc

    r2571 r2580  
    470470TMatrix< TYPE > AmUSVt(N,N); AmUSVt = U;
    471471for(int i=0;i<N;i++) for(int j=0;j<N;j++) AmUSVt(i,j) *= S(j);
    472 AmUSVt *= VT; AmUSVt -= Ainput;
     472AmUSVt = AmUSVt * VT; AmUSVt -= Ainput;
    473473if(nprline>0) {cout<<AmUSVt; cout<<endl;}
    474474//-- Check
     
    502502TMatrix< TYPE > AmUSVt(N,N); AmUSVt = U;
    503503for(int i=0;i<N;i++) for(int j=0;j<N;j++) AmUSVt(i,j) *= (TYPE) S(j);
    504 AmUSVt *= VT; AmUSVt -= Ainput;
     504AmUSVt = AmUSVt * VT; AmUSVt -= Ainput;
    505505if(nprline>0) {cout<<AmUSVt; cout<<endl;}
    506506//-- Check
Note: See TracChangeset for help on using the changeset viewer.