Changeset 461 for library/tests
- Timestamp:
- 07/31/09 13:06:49 (15 years ago)
- Location:
- library/tests
- Files:
-
- 4 modified
Legend:
- Unmodified
- Added
- Removed
-
library/tests/emix_test.cpp
r454 r461 1 #include "shared_ptr.h" 1 2 #include "stat/exp_family.h" 2 3 #include "stat/emix.h" 4 3 5 using namespace bdm; 4 6 … … 80 82 cout << "original empirical variance: " <<Er <<endl; 81 83 82 epdf* Mg = (epdf*)M2.marginal ( y);84 shared_ptr<epdf> Mg(dynamic_cast<epdf *>(M2.marginal(y))); 83 85 mpdf* Cn = (mpdf*)M2.condition ( x ); 84 86 -
library/tests/epdf_harness.cpp
r458 r461 80 80 mat smp = hepdf->sample_m(nsamples); 81 81 int n = smp.cols(); 82 vec Emu = smp * ones(n) / n;83 mat Er = (smp*smp.transpose())/n - outer_product(Emu,Emu);84 CHECK_CLOSE_EX(mean, Emu, tolerance);85 CHECK_CLOSE_EX(R, Er, tolerance);82 vec emu = smp * ones(n) / n; 83 mat er = (smp * smp.T()) / n - outer_product(emu, emu); 84 CHECK_CLOSE_EX(mean, emu, tolerance); 85 CHECK_CLOSE_EX(R, er, tolerance); 86 86 } 87 87 } -
library/tests/testSmp.cpp
r450 r461 94 94 95 95 Smp = mMix.samplecond_m(mu0,N); 96 disp(mMix. _epdf().mean(),zeros(2),Smp);96 disp(mMix.e()->mean(), zeros(2), Smp); 97 97 98 98 cout << "======= EProd ======== " << endl; -
library/tests/test_kalman_QR.cpp
r386 r461 64 64 KF_QR.set_parameters(&evolQR,&evolQR,100); 65 65 evolQR.condition("1 1 1"); 66 KF_QR.set_statistics(evolQR. _e(), &KF);66 KF_QR.set_statistics(evolQR.e(), &KF); 67 67 const epdf& mpost=KF_QR.posterior(); 68 68 const epdf& mposttr=KFtr.posterior();