- Timestamp:
- 05/12/08 17:35:02 (16 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
tests/testSmp.cpp
r32 r104 1 1 #include <itpp/itbase.h> 2 2 #include <stat/libEF.h> 3 #include <stat/emix.h> 3 4 4 5 using namespace itpp; … … 51 52 eG.set_parameters(a,b); 52 53 53 Smp = eG.sample(N); 54 cout << eG.eval(a)<<endl; 55 Smp = eG.sampleN(N); 54 56 55 57 vec g_mu = elem_div(a,b); … … 64 66 Smp=mG.samplecond(mu0,lik,N); 65 67 disp(mu0,pow(mu0,2.0)/k,Smp); 68 69 cout << "======= EMix ======== " << endl; 70 emix eMix(rv); 71 Array<epdf*> Coms(2); 72 Coms(0) = &eG; 73 Coms(1) = &eN; 74 75 eMix.set_parameters(vec_2(0.5,0.5), Coms); 76 vec smp = eMix.sample(); 77 Smp = eMix.sampleN(N); 78 disp(eMix.mean(),zeros(2),Smp); 79 80 cout << "======= MMix_triv ======== " << endl; 81 mmix_triv mMix(rv,rv,&eMix); 82 83 Smp = mMix.samplecond(mu0,lik,N); 84 disp(eMix.mean(),zeros(2),Smp); 66 85 67 86 //Exit program: