Changeset 270 for bdm/stat/emix.cpp

Show
Ignore:
Timestamp:
02/16/09 10:02:08 (15 years ago)
Author:
smidl
Message:

Changes in the very root classes!
* rv and rvc are no longer compulsory,
* samplecond does not return ll
* BM has drv

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • bdm/stat/emix.cpp

    r254 r270  
    55void emix::set_parameters ( const vec &w0, const Array<epdf*> &Coms0, bool copy ) { 
    66        w = w0/sum ( w0 ); 
     7        dim = Coms0(0)->dimension(); 
    78        int i; 
    89        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!" ); 
    1011        } 
    1112        if ( copy ) { 
     
    3536 
    3637emix* emix::marginal(const RV &rv) const{ 
     38        it_assert_debug(isnamed(), "rvs are not assigned"); 
     39                         
    3740        Array<epdf*> Cn(Coms.length()); 
    3841        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(); 
    4043        tmp->set_parameters(w,Cn,false); 
    4144        tmp->ownComs(); 
     
    4447 
    4548mratio* emix::condition(const RV &rv) const{ 
     49        it_assert_debug(isnamed(), "rvs are not assigned"); 
    4650        return new mratio(this,rv); 
    4751};