Changeset 715
- Timestamp:
- 11/10/09 16:07:56 (15 years ago)
- Location:
- library
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
library/bdm/stat/emix.h
r713 r715 159 159 return tmp; 160 160 }; 161 161 162 vec evallog_mat ( const mat &Val ) const { 162 163 vec x = zeros ( Val.cols() ); … … 166 167 return log ( x ); 167 168 }; 168 /* 169 169 170 //! Auxiliary function that returns pdflog for each component 170 mat evallog_ mat( const mat &Val ) const {171 mat evallog_coms ( const mat &Val ) const { 171 172 mat X ( w.length(), Val.cols() ); 172 173 for ( int i = 0; i < w.length(); i++ ) { … … 175 176 return X; 176 177 }; 177 */178 178 179 179 shared_ptr<epdf> marginal ( const RV &rv ) const; … … 215 215 int len = Coms.length(); 216 216 w.set_length( len ); 217 double default_weight = 1.0 / len; 218 for( int i=0; i < len; i++) 219 w(i) = default_weight; 217 w = 1.0 / len; 220 218 } 221 219 } … … 535 533 int len = Coms.length(); 536 534 w.set_length( len ); 537 double default_weight = 1.0 / len; 538 for( int i=0; i < len; i++) 539 w(i) = default_weight; 535 w = 1.0 / len; 540 536 } 541 537 } 542 538 }; 539 SHAREDPTR( mmix ); 543 540 UIREGISTER ( mmix ); 544 541 -
library/tests/merger_2d_test.cpp
r713 r715 59 59 60 60 vec Res1 = M.evallog_mat ( Grid ); 61 mat Res2 = ( MP )->evallog_ mat( Grid );61 mat Res2 = ( MP )->evallog_coms ( Grid ); 62 62 63 63 it_file it ( "merger_2d_test.it" ); -
library/tests/merger_iter_test.cpp
r713 r715 61 61 62 62 vec Res1 = M.evallog_mat ( Grid ); 63 mat Res2 = ( ( emix* ) MP )->evallog_ mat( Grid );63 mat Res2 = ( ( emix* ) MP )->evallog_coms ( Grid ); 64 64 65 65 it_file it ( "merger_iter_test.it" );