Changeset 1072 for library/tests
- Timestamp:
- 06/10/10 12:29:54 (15 years ago)
- Location:
- library/tests/testsuite
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
library/tests/testsuite/datasource_test.cpp
r1064 r1072 3 3 #include "../mat_checks.h" 4 4 #include "UnitTest++.h" 5 #include "../bdm/stat/emix.h" 5 6 6 7 using namespace bdm; … … 60 61 OM->validate(); 61 62 62 StateDS sds; 63 sds.set_parameters ( IM, OM ); 64 sds.validate(); 63 PdfDS pds; 64 Array<shared_ptr<pdf> > Arr(2); 65 Arr(0) = OM; 66 Arr(1)= IM; 67 68 shared_ptr<mprod> mp; 69 mp->set_elements(Arr); 70 71 pds.ipdf=mp; 72 pds.validate(); 65 73 66 74 for ( int t = 1; t < 10; t++ ) { 67 sds.write ( vec_1 ( double ( t ) ) );75 pds.write ( vec_1 ( double ( t ) ) ); 68 76 // TODO ZDE TO SPADNE 69 sds.step();77 pds.step(); 70 78 } 71 79 72 80 vec dt; 73 sds.getdata ( dt );81 pds.getdata ( dt ); 74 82 CHECK_CLOSE ( vec ( "94.5, 94.5, 13.5, 9" ), dt, 1e-2 ); 75 83 } -
library/tests/testsuite/merger_test.cpp
r1064 r1072 7 7 8 8 using namespace bdm; 9 10 TEST (ENormMerger_test){ 11 ENormMerger<ldmat> m1; 12 m1.sources.set_length(2); 13 m1.sources(0) = new enorm<ldmat>(vec_2(1.0, 1.0), mat_2x2(1.0, 0.0, 0.0, 2.0)); 14 m1.sources(1) = new enorm<ldmat>(vec_2(2.0, 2.0), mat_2x2(2.0, 1.0, 1.0, 2.0)); 15 m1.validate(); 16 m1.merge(); 17 18 cout << "mean: " << m1.merger().mean() << endl; 19 cout << "var: " << m1.merger().covariance() << endl; 20 } 9 21 10 22 TEST ( merger_base_test ) {