Show
Ignore:
Timestamp:
11/25/09 12:46:08 (15 years ago)
Author:
mido
Message:

a few moves of code from h to cpp, however, only part of the whole library is done

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • library/bdm/base/datasources.cpp

    r737 r738  
    4040        time = 0; 
    4141        Data = Dat; 
     42} 
     43 
     44void PdfDS::step() { 
     45        yt2rgr.store_data ( yt ); // y is now history 
     46        ut2rgr.filldown ( ut, rgr ); 
     47        yt2rgr.filldown ( yt, rgr ); 
     48        yt = ipdf->samplecond ( rgr ); 
     49        ut2rgr.store_data ( ut ); //u is now history 
     50} 
     51 
     52void PdfDS::getdata ( vec &dt_out ) const { 
     53        bdm_assert_debug ( dt_out.length() >= utsize + ytsize, "Short output vector" ); 
     54        dt_out.set_subvector ( 0, yt ); 
     55        dt_out.set_subvector ( ytsize, ut ); 
     56} 
     57 
     58void StateDS::step() { 
     59        vec imc ( IM->dimensionc() ); 
     60        imc.set_subvector ( 0, xt ); 
     61        u2imc.filldown ( ut, imc ); 
     62        xt = IM->samplecond ( imc ); 
     63 
     64        vec omc ( OM->dimensionc() ); 
     65        omc.set_subvector ( 0, xt ); 
     66        u2omc.filldown ( ut, omc ); 
     67        vec yt; 
     68        yt = OM->samplecond ( omc ); 
     69        //fill all data 
     70        dt.set_subvector ( 0, yt ); 
     71        dt.set_subvector ( yt.length(), xt ); 
     72        dt.set_subvector ( ytsize, ut ); 
    4273} 
    4374