Changeset 721 for library/tests/stresssuite
- Timestamp:
- 11/13/09 09:15:50 (15 years ago)
- Location:
- library/tests/stresssuite
- Files:
-
- 1 added
- 1 modified
- 16 moved
Legend:
- Unmodified
- Added
- Removed
-
library/tests/stresssuite/CMakeLists.txt
r717 r721 9 9 LINK_EXEC(square_mat_prep) 10 10 11 EXEC(testResample)12 11 13 # ESTIM EXECS 14 EXEC(arx_test) 15 EXEC(arx_elem_test) 12 # using UnitTest++ 16 13 17 EXEC(merger_2d_test) 18 EXEC(merger_iter_test) 19 EXEC(mixtures_test)14 add_executable(stresssuite stresssuite.cpp resample_stress.cpp arx_stress.cpp arx_elem_stress.cpp merger_2d_stress.cpp merger_iter_stress.cpp mixtures_stress.cpp kalman_stress.cpp particle_stress.cpp 15 #kalman_QR_stress.cpp kalman_QRexh_stress.cpp 16 blas_stress.cpp ) 20 17 21 EXEC(test_kalman) 22 EXEC(test_particle) 23 #EXEC(test_kalman_QR) 24 #EXEC(test_kalman_QRexh) 18 target_link_libraries(stresssuite testutil unittest) 19 LINK_EXEC(stresssuite) 25 20 26 EXEC(blas_test) 21 -
library/tests/stresssuite/arx_elem_stress.cpp
r717 r721 1 1 #include "estim/arx.h" 2 #include "../mat_checks.h" 3 2 4 using namespace bdm; 3 5 4 int main() {6 TEST ( arx_elem_stress ) { 5 7 // Setup model : ARX for 1D Gaussian 6 8 //Test constructor -
library/tests/stresssuite/arx_stress.cpp
r717 r721 12 12 13 13 #include "estim/arx.h" 14 #include "../mat_checks.h" 15 14 16 using namespace bdm; 15 17 16 int main() {18 TEST ( arx_stress ) { 17 19 // Setup model 18 20 vec th ( "0.8 -0.3 0.4 0.01" ); -
library/tests/stresssuite/blas_stress.cpp
r717 r721 1 1 #include "../mat_checks.h" 2 2 #include <itpp/itbase.h> 3 3 using namespace itpp; … … 42 42 } 43 43 44 int main() {44 TEST ( blas_stress ) { 45 45 Real_Timer tt; 46 46 vec exec_times ( 4 ); … … 87 87 itf << Name ( "exec_times_b" ) << exec_times_b; 88 88 itf << Name ( "exec_times_c" ) << exec_times_c; 89 90 return 0;91 89 } -
library/tests/stresssuite/kalman_QR_stress.cpp
r717 r721 2 2 #include <estim/kalman.h> 3 3 #include <estim/particles.h> 4 #include "../mat_checks.h" 4 5 5 6 using namespace bdm; … … 9 10 using std::endl; 10 11 11 int main() {12 TEST ( kalman_QR_stress ) { 12 13 // Klaman filter 13 14 mat A, B, C, D, R, Q, P0; … … 15 16 mat Mu0;// read from matlab 16 17 // input from Matlab 17 it_file fin ( " testKF.it" );18 it_file fin ( "kalman_stress.it" ); 18 19 19 20 mat Dt, XQRt, eR, eQ; … … 22 23 bool xxx = fin.seek ( "d" ); 23 24 if ( !xxx ) { 24 bdm_error ( " testKF.it not found" );25 bdm_error ( "kalman_stress.it not found" ); 25 26 } 26 27 fin >> Dt; … … 84 85 } 85 86 86 it_file fou ( " testKF_QR_res.it" );87 it_file fou ( "kalman_stress_QR_res.it" ); 87 88 fou << Name ( "xqrth" ) << XQRt; 88 89 fou << Name ( "xth" ) << Xt; 89 //Exit program:90 return 0;91 92 90 } -
library/tests/stresssuite/kalman_QRexh_stress.cpp
r717 r721 2 2 #include <estim/kalman.h> 3 3 #include <estim/particles.h> 4 #include "../mat_checks.h" 4 5 5 6 using namespace bdm; … … 9 10 using std::endl; 10 11 11 int main() {12 TEST ( kalman_QRexh_stress ) { 12 13 // Klaman filter 13 14 mat A, B, C, D, R, Q, P0; … … 15 16 mat Mu0;// read from matlab 16 17 // input from Matlab 17 it_file fin ( " testKF.it" );18 it_file fin ( "kalman_stress.it" ); 18 19 19 20 mat Dt, XQRt, eR, eQ; … … 23 24 24 25 if ( !xxx ) { 25 bdm_error ( " testKF.it not found" );26 bdm_error ( "kalman_stress.it not found" ); 26 27 } 27 28 … … 77 78 } 78 79 79 it_file fou ( " testKF_QR_exh.it" );80 it_file fou ( "kalman_stress_QR_exh.it" ); 80 81 81 82 fou << Name ( "LL" ) << LL; 82 83 fou << Name ( "Q1" ) << vQ1; 83 84 fou << Name ( "Q2" ) << vQ2; 84 //Exit program:85 return 0;86 87 85 } -
library/tests/stresssuite/kalman_stress.cpp
r717 r721 1 1 2 2 #include <estim/kalman.h> 3 #include "../mat_checks.h" 3 4 4 5 using namespace bdm; … … 8 9 using std::endl; 9 10 10 int main() {11 TEST ( kalman_stress ) { 11 12 // Kalman filter 12 13 mat A, B, C, D, R, Q, P0; … … 14 15 mat Mu0;; 15 16 // input from Matlab 16 it_file fin ( " testKF.it" );17 it_file fin ( "kalman_stress.it" ); 17 18 18 19 mat Dt; … … 21 22 bool xxx = fin.seek ( "d" ); 22 23 if ( !xxx ) { 23 bdm_error ( " testKF.it not found" );24 bdm_error ( "kalman_stress.it not found" ); 24 25 } 25 26 fin >> Dt; … … 120 121 121 122 122 it_file fou ( " testKF_res.it" );123 it_file fou ( "kalman_stress_res.it" ); 123 124 fou << Name ( "xth" ) << Xt; 124 125 fou << Name ( "xth2" ) << Xt2; 125 126 fou << Name ( "xthE" ) << XtE; 126 127 fou << Name ( "exec_times" ) << exec_times; 127 //Exit program:128 return 0;129 130 128 } -
library/tests/stresssuite/kalman_stress.m
r717 r721 30 30 31 31 d=[y;u]; 32 itsave(' testKF.it',d,A,B,C,D,Q,R,P0,mu0)32 itsave('kalman_stress.it',d,A,B,C,D,Q,R,P0,mu0) 33 33 save testKF 34 34 else -
library/tests/stresssuite/kalman_stress_big.m
r717 r721 33 33 34 34 d=[y;u]; 35 itsave(' testKF.it',d,A,B,C,D,Q,R,P0,mu0)35 itsave('kalman_stress.it',d,A,B,C,D,Q,R,P0,mu0) 36 36 save testKF 37 37 else -
library/tests/stresssuite/merger_2d_stress.cpp
r717 r721 2 2 #include "stat/exp_family.h" 3 3 #include "stat/merger.h" 4 5 using namespace bdm; 4 #include "../mat_checks.h" 6 5 7 6 using namespace bdm; … … 11 10 using std::endl; 12 11 13 int main() {12 TEST ( merger_2d_stress ) { 14 13 15 14 RNG_randomize(); -
library/tests/stresssuite/merger_iter_stress.cpp
r717 r721 1 2 1 #include "stat/exp_family.h" 3 2 #include "stat/merger.h" 4 5 using namespace bdm; 3 #include "../mat_checks.h" 6 4 7 5 using namespace bdm; … … 11 9 using std::endl; 12 10 13 int main() {11 TEST ( merger_iter_stress ) { 14 12 15 13 RNG_randomize(); -
library/tests/stresssuite/mixtures_stress.cpp
r717 r721 2 2 #include "estim/arx.h" 3 3 #include "stat/exp_family.h" 4 #include "../mat_checks.h" 5 4 6 using namespace bdm; 5 7 … … 39 41 } 40 42 41 int main() {43 TEST ( mixtures_stress ) { 42 44 RV x ( "{x }", "2" ); 43 45 -
library/tests/stresssuite/particle_stress.cpp
r717 r721 1 2 1 #include <estim/particles.h> 3 2 #include <math/square_mat.h> 4 3 #include "stat/exp_family.h" 4 #include "../mat_checks.h" 5 5 6 6 using namespace bdm; … … 10 10 using std::endl; 11 11 12 int main() { 13 12 TEST ( particle_stress ) { 14 13 RV x ( "1" ); 15 14 RV xm = x; … … 41 40 42 41 cout << ind << endl; 43 44 //Exit program:45 return 0;46 47 42 } -
library/tests/stresssuite/resample_stress.cpp
r717 r721 1 1 #include "../mat_checks.h" 2 2 #include "estim/particles.h" 3 3 #include "math/square_mat.h" … … 10 10 using std::endl; 11 11 12 int main() {12 TEST ( resample_stress ) { 13 13 14 14 RV x ( "1" ); … … 41 41 42 42 cout << ind << endl; 43 44 //Exit program:45 return 0;46 47 43 }