Show
Ignore:
Timestamp:
05/28/10 22:50:46 (14 years ago)
Author:
smidl
Message:

DEBUG macro for conditional output + new class

Files:
1 modified

Legend:

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

    r1009 r1020  
    7676} 
    7777\enddot 
     78 
     79RV name may be empty string! In that case, it is not a valid name but only a size holder. It will fail in comparison. 
    7880*/ 
    7981 
     
    10231025        protected: 
    10241026                datalink_part dl; 
     1027                int vecfromlen; 
    10251028        public: 
    10261029                void update(const vec &v1){ 
    10271030                        bdm_assert_debug(length()==dl._downsize(),"vec_from_vec incompatible"); 
    1028                         bdm_assert_debug(v1.length()>=dl._upsize(),"vec_from_vec incompatible");//does not guarantee anything! 
     1031                        bdm_assert_debug(v1.length()==vecfromlen,"This vec was connected to vec of length "+num2str(vecfromlen)+ 
     1032                        ", but vec of length "+num2str(v1.length())+" was obtained"  ); 
    10291033                        dl.filldown(v1,*this); 
    10301034                }; 
    1031                 void connect(const RV &vecrv, const RV & vec1){dl.set_connection(vecrv,vec1);set_length(vecrv._dsize());}; 
     1035                void connect(const RV &vecrv, const RV & vec1){ 
     1036                        bdm_assert(vecrv._dsize()==length(),"Description of this vector, "+ vecrv.to_string() +" does not math it length: " + num2str(length())); 
     1037                        dl.set_connection(vecrv,vec1); 
     1038                        bdm_assert(dl._downsize()==length(), "Rv of this vector, "+vecrv.to_string() +" was not found in given rv: "+vec1.to_string()); 
     1039                }; 
    10321040}; 
    10331041 
     
    12521260class BM : public root { 
    12531261        //! \var log_level_enums logfull 
    1254         //! TODO DOPLNIT 
     1262        //! log full description of posterior in descriptive structure 
    12551263 
    12561264        //! \var log_level_enums logevidence 
    1257         //! TODO DOPLNIT 
     1265        //! log value of eveidence in each step 
    12581266         
    12591267        //! \var log_level_enums logbounds 
    1260         //! TODO DOPLNIT         
     1268        //! log lower and upper bounds of estimates 
    12611269        LOG_LEVEL(BM,logfull,logevidence,logbounds); 
    12621270