Changeset 722 for library/tests/stresssuite/kalman_stress.cpp
- Timestamp:
- 11/13/09 16:11:31 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
library/tests/stresssuite/kalman_stress.cpp
r721 r722 63 63 KF.set_parameters ( A, B, C, D, chmat ( Q ), chmat ( R ) ); 64 64 KF.set_statistics ( mu0, chmat ( P0 ) ); //prediction! 65 KF.set_evalll (false);65 KF.set_evalll ( false ); 66 66 KF.validate(); 67 67 const epdf& KFep = KF.posterior(); … … 71 71 // FULL 72 72 KalmanFull KF2; 73 KF2.set_parameters ( A, B, C, D, Q, R);74 KF2.set_statistics (mu0, P0 );75 KF2.set_evalll (false);73 KF2.set_parameters ( A, B, C, D, Q, R ); 74 KF2.set_statistics ( mu0, P0 ); 75 KF2.set_evalll ( false ); 76 76 KF2.validate(); 77 77 mat Xt2 ( dimx, Ndat ); … … 85 85 KFE.set_parameters ( fxu, hxu, Q, R ); 86 86 KFE.set_statistics ( mu0, chmat ( P0 ) ); 87 KFE.set_evalll (false);87 KFE.set_evalll ( false ); 88 88 KFE.validate(); 89 89 const epdf& KFEep = KFE.posterior(); … … 98 98 tt.tic(); 99 99 for ( int t = 1; t < Ndat; t++ ) { 100 dt = Dt.get_col (t);101 KF.bayes ( dt.get (0,C.rows()-1), dt.get(C.rows(), dt.length()-1) );100 dt = Dt.get_col ( t ); 101 KF.bayes ( dt.get ( 0, C.rows() - 1 ), dt.get ( C.rows(), dt.length() - 1 ) ); 102 102 Xt.set_col ( t, KFep.mean() ); 103 103 } … … 106 106 tt.tic(); 107 107 for ( int t = 1; t < Ndat; t++ ) { 108 dt = Dt.get_col (t);109 KF2.bayes ( dt.get (0,C.rows()-1), dt.get(C.rows(), dt.length()-1) );108 dt = Dt.get_col ( t ); 109 KF2.bayes ( dt.get ( 0, C.rows() - 1 ), dt.get ( C.rows(), dt.length() - 1 ) ); 110 110 Xt2.set_col ( t, KF2.posterior().mean() ); 111 111 } … … 114 114 tt.tic(); 115 115 for ( int t = 1; t < Ndat; t++ ) { 116 dt = Dt.get_col (t);117 KFE.bayes ( dt.get (0,C.rows()-1), dt.get(C.rows(), dt.length()-1) );116 dt = Dt.get_col ( t ); 117 KFE.bayes ( dt.get ( 0, C.rows() - 1 ), dt.get ( C.rows(), dt.length() - 1 ) ); 118 118 XtE.set_col ( t, KFEep.mean() ); 119 119 }