Changeset 1107 in Sophya for trunk/SophyaProg
- Timestamp:
- Jul 27, 2000, 7:33:55 PM (25 years ago)
- Location:
- trunk/SophyaProg/Tests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaProg/Tests/arrt.cc
r1102 r1107 113 113 cout << " ----- Vector va apres va(Range(0,6)) += 100. " << va << endl; 114 114 115 TMatrix<r_4> esm(3,5); 116 esm = (EnumeratedSequence(), 117 11 , 12 , 13, 14, 15, 118 21 , 22 , 23, 24, 25 119 ); 120 // 31 , 32 , 33, 34, 35 ) ; 121 122 cout << "\n TMatrix<r_4> esm(3,5) = EnumeratedSequence(), 11 , 12 , 13, 14, 15 ... " 123 << esm << endl; 124 115 125 cout << "\n :::::: Testing Matrix operations :::::: " << endl; 116 126 TMatrix<r_4> ra(2,2), ira(2,2); … … 123 133 es, 2 , 1 , 4 , 3 ; 124 134 ra = es ; 125 126 135 127 136 cout << " ----- Matrix ra = \n " << ra << endl; -
trunk/SophyaProg/Tests/carrt.cc
r1102 r1107 13 13 14 14 static int prtlev = 0; 15 static int nprt = 0;15 static int nprt = 100; 16 16 17 17 template <class T> … … 72 72 cout << "\n -----> Testing TArray Conversion <---- " << endl; 73 73 TArray<int_4> ia(7,5); 74 ia = Sequence(10., 2.);74 ia = RegularSequence(10., 2.); 75 75 TArray<r_4> ra(7,5); 76 76 ra = ia; 77 cout << " ra = ia(= Sequence(10., 2.)) = \n " << ra << endl;77 cout << " ra = ia(= RegularSequence(10., 2.)) = \n " << ra << endl; 78 78 cout << ra << endl; 79 79 TArray<r_4> rb(5,3); 80 rb = Sequence(20., .5);80 rb = RegularSequence(20., .5); 81 81 TMatrix<int_4> mx(3,5); 82 cout << " TArray<r_4> rb(5,3); rb = Sequence(20., .5); rb : " << endl;82 cout << " TArray<r_4> rb(5,3); rb = RegularSequence(20., .5); rb : " << endl; 83 83 cout << rb << endl; 84 84 mx = rb; … … 132 132 else cout << " OK Test C = (A*4+1)/B OK " << endl; 133 133 134 a = RegularSequence(1, 1); 135 b = RegularSequence(nr*nc, -1); 136 c = (a*2)+(b*2); 137 if (prtlev > 0) { 138 cout << " A = \n " << a << endl; 139 cout << " B = \n " << b << endl; 140 cout << " C = 2A-2*B= \n " << c << endl; 141 } 142 c /= (nr*nc+1); 143 getMinMax(c, min, max); 144 if ((min != 2) || (max != 2)) { 145 cout << "!!! ERROR Test3 C=2A+2*B Min=" << min << " Max=" << max << endl; 146 rc += 1; 147 } 148 else cout << " OK Test3 C=2A+2*B OK " << endl; 149 134 150 return(rc); 135 151 } … … 172 188 } 173 189 else cout << " OK Test C = (A*4+12)/B OK " << endl; 190 191 a = RegularSequence(1, 1); 192 b = RegularSequence(nr*nc, -1); 193 c = (a*2.f)+(b*2.f); 194 if (prtlev > 0) { 195 cout << " A = \n " << a << endl; 196 cout << " B = \n " << b << endl; 197 cout << " C = 2A-2*B= \n " << c << endl; 198 } 199 c /= (nr*nc+1); 200 getMinMax(c, min, max); 201 if ((fabs(min-2.) > 0.0001) || (fabs(max-2.) > 0.0001)) { 202 cout << "!!! ERROR Test3 C=2A+2*B Min=" << min << " Max=" << max << endl; 203 rc += 1; 204 } 205 else cout << " OK Test3 C=2A+2*B OK " << endl; 206 174 207 return(rc); 175 208
Note:
See TracChangeset
for help on using the changeset viewer.