Show
Ignore:
Timestamp:
09/13/09 23:14:31 (15 years ago)
Author:
smidl
Message:

documentation

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • library/bdm/base/bdmbase.h

    r610 r613  
    710710        //! push current data to history 
    711711        void step ( const vec &val_up ) { 
    712                 if ( Hrv._dsize() > 0 ) { 
    713                         history.shift_right ( 0, Hrv._dsize() ); 
    714                   history.set_subvector ( 0, val_up(v2h_up) ); // write U after Drv 
     712                if ( v2h_up.length() > 0 ) { 
     713                        history.shift_right ( 0, v2h_up.length() ); 
     714                  history.set_subvector ( 0, val_up(v2h_up) );  
    715715                } 
    716716        } 
     
    748748                downsize = v2v_down.length() + h2v_down.length(); 
    749749                upsize = v2v_up.length(); 
     750        } 
     751        //! set history of variable given by \c rv1 to values of \c hist. 
     752        void set_history(const RV& rv1, const vec &hist0){ 
     753                bdm_assert(rv1._dsize()==hist0.length(),"hist is not compatible with given rv1"); 
     754                ivec ind_H; 
     755                ivec ind_h0; 
     756                Hrv.dataind(rv1, ind_H, ind_h0); // find indeces of rv in  
     757                set_subvector(history, ind_H, hist0(ind_h0)); // copy given hist to appropriate places 
    750758        } 
    751759}; 
     
    964972                bdm_error ( "abstract class" ); 
    965973        } 
    966  
    967974        //! Returns data records at indeces. 
    968975        virtual void getdata ( vec &dt, const ivec &indeces ) {