source: Sophya/trunk/SophyaProg/Tests/carrt.cc@ 1083

Last change on this file since 1083 was 1083, checked in by ansari, 25 years ago

Test de conversion de tableaux - Reza 24/7/2000

File size: 1.2 KB
RevLine 
[1083]1#include "machdefs.h"
2
3#include <math.h>
4#include <iostream.h>
5
6#include "tarrinit.h"
7#include "array.h"
8#include "timing.h"
9
10int main(int narg, char* arg[])
11{
12
13 SophyaInit();
14 InitTim(); // Initializing the CPU timer
15 try {
16 cout << "\n -----> Testing TArray Conversion <---- " << endl;
17 TArray<int_4> ia(7,5);
18 ia = Sequence(10., 2.);
19 TArray<r_4> ra(7,5);
20 ra = ia;
21 cout << ra << endl;
22 TArray<r_4> rb(5,3);
23 rb = Sequence(20., .5);
24 TMatrix<int_4> mx(3,5);
25 cout << " TArray<r_4> rb(5,3); rb = Sequence(20., .5); rb : " << endl;
26 cout << rb << endl;
27 mx = rb;
28 cout << " TMatrix<int_4> mx(3,5); mx = rb; mx: " << endl;
29 cout << mx << endl;
30 TArray<r_4> rc(10);
31 rc = 3.1415;
32 TMatrix<r_8> mx2(rc);
33 cout << " TArray<r_4> rc(10) = 3.1415 , TMatrix<r_8> mx2(rc) rc : " << endl;
34 cout << mx2 << endl;
35 TMatrix<int_4> mx3(3,5);
36 cout << " Trying TMatrix<int_4> mx3(3,5); mx3 = rc; ?? " << endl;
37 mx3 = rc;
38 }
39 catch (PThrowable & exc) {
40 cerr << " catched Exception " << exc.Msg() << endl;
41 }
42 catch (...) {
43 cerr << " catched unknown (...) exception " << endl;
44 }
45
46}
Note: See TracBrowser for help on using the repository browser.