Changeset 786 in Sophya for trunk


Ignore:
Timestamp:
Mar 16, 2000, 7:37:04 PM (26 years ago)
Author:
ansari
Message:

Programmes test de TArray<T> Reza 16/3/2000

Location:
trunk/SophyaProg/Tests
Files:
1 added
1 edited

Legend:

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

    r778 r786  
    2929    for(j=0; j<n; j++)  a(i,j,0) = GauRnd(0., 1.);
    3030 
    31   TArray<r_4> x(1,n), b(1,n);
     31  TArray<r_4> x(1,n), b(n,n);
    3232  r_4 sum ;
    3333  for(i=0; i<n; i++) x(0,i,0) = GauRnd(2., 1.5);
     
    5757  } 
    5858 
    59   try {
    60   cout << "\n -----> Testing TArray <---- " << endl; 
    61   TArray<int_4> ia(6,4);
    62   TArray<int_4> ib(2,3);
    63   Sequence seq(10., 2.);
    64   ia = seq;
    65   ib = 5;
    66   cout << " ----- matrix IA = \n " << ia << endl;
    67   cout << " ----- matrix IB = \n " << ib << endl;
    68   uint_4 pos[5];
    69   uint_4 sz[5];
    70   pos[0] = 3;  pos[1] = 1;
    71   sz[0] = 3;  sz[1] = 2;
    72   TArray<int_4> ic = ia.SubArray(2, sz, pos);
    73   cout << " ----- matrix IC IA(3,2,3,1) = \n " << ic << endl;
    74   ic = 0;
    75   cout << " ----- matrix IA = \n " << ia << endl;
    76   }
    77   catch (PThrowable exc) {
    78     cerr << " catched Exception " << exc.Msg() << endl;
    79   } 
    80   catch (...) {
    81     cerr << " catched unknown (...) exception " << endl;
    82   } 
    8359  cout << " ---------------  END of Programme -------------- " << endl;
    8460}
Note: See TracChangeset for help on using the changeset viewer.