Changeset 1079 for applications/bdmtoolbox
- Timestamp:
- 06/10/10 21:54:57 (15 years ago)
- Location:
- applications/bdmtoolbox
- Files:
-
- 4 modified
Legend:
- Unmodified
- Added
- Removed
-
applications/bdmtoolbox/mex/merger.cpp
r801 r1079 59 59 Array<shared_ptr<pdf> > Sources; 60 60 UI::get(Sources, Cfg, "Sources", UI::compulsory); 61 shared_ptr< merger_base> Merger = UI::build<merger_base> ( Cfg, "Merger" );61 shared_ptr<MergerDiscrete> Merger = UI::build<MergerDiscrete> ( Cfg, "Merger" ); 62 62 63 63 // Support … … 82 82 for ( int i = 0;i < Sources.length();i++ ) { 83 83 datalink_m2e dl; 84 dl.set_connection ( Sources ( i )->_rv(), Sources ( i )->_rvc(), Merger-> _rv() );84 dl.set_connection ( Sources ( i )->_rv(), Sources ( i )->_rvc(), Merger->merger()._rv() ); 85 85 86 86 vec ll ( Merger->_Smp()._samples().length() ); … … 102 102 vec ll ( Merger->_Smp()._samples().length() ); 103 103 for ( int j = 0; j < Merger->_Smp()._samples().length(); j++ ) { 104 ll ( j ) = Mer ger->evallog ( Merger->_Smp()._samples() ( j ));104 ll ( j ) = MerMix->merger()._w ()(j); 105 105 } 106 106 -
applications/bdmtoolbox/tutorial/merging/merge_grid.m
r706 r1079 6 6 7 7 % merger 8 Merger.class=' merger_base';8 Merger.class='MergerDiscrete'; 9 9 Merger.beta=1; 10 10 … … 48 48 49 49 % 2D support 50 type= 1;50 type=0; 51 51 if type==0 52 52 support2.class='rectangular_support'; -
applications/bdmtoolbox/tutorial/merging/merge_mix.m
r706 r1079 1 1 % Random Variables 2 a= struct('class','RV','names',{{'a'}});3 b= struct('class','RV','names',{{'b'}});4 ab= struct('class','RV','names',{{'a','b'}});2 a=RV('a'); 3 b=RV('b'); 4 ab=RV({'a','b'}); 5 5 6 6 % Sources … … 17 17 18 18 % merger 19 merger.class='merger_mix';20 merger.method='lognormal';21 merger.beta=2;22 merger.ncoms=20;23 merger.stop_niter=5;24 merger.effss_coef=1;19 M.class='merger_mix'; 20 M.method='lognormal'; 21 M.beta=2; 22 M.ncoms=20; 23 M.stop_niter=5; 24 M.effss_coef=1; 25 25 %merger.dbg_file='merger_mix_dbg'; 26 26 27 27 % support 28 support.grid={[-5,5]}; 29 support.nbins=[100]; 28 support.class='rectangular_support'; 29 support.ranges={[-5,5]}; 30 support.gridsizes=[100]; 30 31 31 32 % 1D 32 [vy]=merger _mx({f1,f2},support,merger)33 [vy]=merger({f1,f2},support,M) 33 34 figure(1) 34 35 hold off … … 48 49 'rv', ab); 49 50 f4 = struct('class','egiw',... 50 ' V',4*[5 2; 2 1],...51 'fV',4*[5 2; 2 1],... 51 52 'nu', 4,... 52 53 'dimx', 1,... 53 54 'rv', ab); 54 55 % 2D support 55 support2.grid={[-5,5],[0.001,5]}; 56 support2.nbins=[20,20]; 56 support2.class='rectangular_support'; 57 support2.ranges={[-5,5],[0.001,5]}; 58 support2.gridsizes=[20,20]; 57 59 58 60 % 2D 59 vy2=merger _mx({f3,f4},support2,merger)60 X=zeros(support2. nbins(1));61 Y=zeros(support2. nbins(1));62 Z=zeros(support2. nbins(1));61 vy2=merger({f3,f4},support2,M) 62 X=zeros(support2.gridsizes(1)); 63 Y=zeros(support2.gridsizes(1)); 64 Z=zeros(support2.gridsizes(1)); 63 65 64 66 figure(2); -
applications/bdmtoolbox/tutorial/merging/pdfs.m
r803 r1079 33 33 'rv', ab); 34 34 GiW = struct('class','egiw',... 35 ' V',4*[2^2+1 2; 2 1],...35 'fV',4*[2^2+1 2; 2 1],... 36 36 'nu', 8,... 37 37 'dimx', 1,...