Changeset 177
- Timestamp:
- 10/09/08 11:32:13 (16 years ago)
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
bdm/estim/merger.h
r176 r177 43 43 { beta=2.0; Ns=100; Nc=10;} 44 44 //! Set internal parameters used in approximation 45 void set parameters ( double beta0, int Ns0, int Nc0 ) { beta=beta0;Ns=Ns0;Nc=Nc0;}45 void set_parameters ( double beta0, int Ns0, int Nc0 ) { beta=beta0;Ns=Ns0;Nc=Nc0;} 46 46 //!Initialize the proposal density. This function must be called before merge()! 47 47 void init() { -
bdm/estim/mixef.h
r176 r177 66 66 BM ( RV() ), n ( Coms0.length() ), Coms ( n ), 67 67 weights ( RV ( "{w }", vec_1 ( n ) ),alpha0 ) { 68 it_assert_debug ( n>0,"MixEF::MixEF : Empty Component list" );68 // it_assert_debug ( n>0,"MixEF::MixEF : Empty Component list" ); 69 69 70 70 for ( int i=0;i<n;i++ ) {Coms ( i ) = ( BMEF* ) Coms0 ( i )->_copy_();} -
tests/merger_test.cpp
r176 r177 35 35 36 36 merger M ( A ); 37 cout << M.lognorm_merge(lW)<<endl; 38 // eEmp res=M.merge(100); 39 40 37 vec m2 = M.lognorm_merge(lW); 38 M.set_parameters(31.0/30.0,10,100); 39 vec m1 = M.lognorm_merge(lW); 40 M.set_parameters(3.0,10,100); 41 vec m3 = M.lognorm_merge(lW); 42 43 44 it_file it("merger_test.it"); 45 it << Name("lf1") << l_f1; 46 it << Name("lf2") << l_f2; 47 it << Name("m1") << m1; 48 it << Name("m2") << m2; 49 it << Name("m3") << m3; 41 50 } 42 51