Changeset 270 for bdm/stat/emix.cpp
- Timestamp:
- 02/16/09 10:02:08 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
bdm/stat/emix.cpp
r254 r270 5 5 void emix::set_parameters ( const vec &w0, const Array<epdf*> &Coms0, bool copy ) { 6 6 w = w0/sum ( w0 ); 7 dim = Coms0(0)->dimension(); 7 8 int i; 8 9 for ( i=0;i<w.length();i++ ) { 9 it_assert_debug ( rv.equal ( Coms0 ( i )->_rv() ),"RVs do not match!" );10 it_assert_debug ( dim== ( Coms0 ( i )->dimension() ),"Component sizes do not match!" ); 10 11 } 11 12 if ( copy ) { … … 35 36 36 37 emix* emix::marginal(const RV &rv) const{ 38 it_assert_debug(isnamed(), "rvs are not assigned"); 39 37 40 Array<epdf*> Cn(Coms.length()); 38 41 for(int i=0;i<Coms.length();i++){Cn(i)=Coms(i)->marginal(rv);} 39 emix* tmp = new emix( rv);42 emix* tmp = new emix(); 40 43 tmp->set_parameters(w,Cn,false); 41 44 tmp->ownComs(); … … 44 47 45 48 mratio* emix::condition(const RV &rv) const{ 49 it_assert_debug(isnamed(), "rvs are not assigned"); 46 50 return new mratio(this,rv); 47 51 };