Changeset 857 in Sophya for trunk/SophyaProg/Tests/tsttmat.cc


Ignore:
Timestamp:
Apr 10, 2000, 3:04:05 PM (25 years ago)
Author:
ansari
Message:

Adapatation a SphereHEALPix, correction tsttmatrix.cc tsttvector.cc - Reza 10/4/2000

File:
1 edited

Legend:

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

    r768 r857  
    77#include "ntoolsinit.h"
    88#include "pexceptions.h"
    9 #include "tmatrix.h"
    10 #include "nbrandom.h"
     9#include "array.h"
     10#include "srandgen.h"
    1111
    1212////////////////////////////////////////////////////////////////////////////////////////
     
    2424{
    2525cout << " Test ecriture PPersist TMatrix " << endl;
    26 FIO_TMatrix<r_8> ftm(A);
     26FIO_TArray<r_8> ftm(A);
    2727ftm.Write("tmtx.ppf");
    2828}
    2929{
    3030cout << " Test lecture PPersist TMatrix " << endl;
    31 FIO_TMatrix<r_8> ftm("tmtx.ppf");
     31FIO_TArray<r_8> ftm("tmtx.ppf");
    3232cout<<"Alue:"<<(TMatrix<r_8>)ftm<<endl;
    3333}
     
    182182{
    183183Matrix M(X); cout<<"Matrix M"<<endl<<M<<endl;
    184 Matrix MI = M.Inverse(); cout<<"MI"<<endl<<MI;
     184Matrix MI = Inverse(M); cout<<"MI"<<endl<<MI;
    185185MI *= M; cout<<"MI*M"<<endl<<MI;
    186186r_8 xmin=-1.;
     
    196196cout<<"TMatrix X"<<endl<<X;
    197197TMatrix<r_8> Xinv;
    198 Xinv = X.Inverse();
     198Xinv = Inverse(X);
    199199cout<<"TMatrix Xinv"<<endl<<Xinv;
    200200Xinv *= X;
     
    213213cout<<"MI"<<endl<<MI;
    214214{
    215 TMatrix<r_8> L(MI.NRows(),MI.NCol(),MI.Data(),new Bridge);
    216 cout<<"L"<<endl<<L;
    217 L *= 100.; cout<<"L*=100."<<endl<<L;
     215  uint_4 siz[5];
     216  siz[0] = MI.NCols();
     217  siz[1] = MI.NRows();
     218  TArray<r_8> A(2, siz, MI.Data(), 1, 0, new Bridge);
     219  TMatrix<r_8> L(A);
     220  cout<<"L"<<endl<<L;
     221  L *= 100.; cout<<"L*=100."<<endl<<L;
    218222} // destruction de L
    219223cout<<"MI(4,4)="<<MI(4,4)<<endl;
Note: See TracChangeset for help on using the changeset viewer.