Changeset 399

Show
Ignore:
Timestamp:
06/29/09 15:18:56 (15 years ago)
Author:
smidl
Message:

compilation + DFLT in merger

Location:
library/bdm
Files:
3 modified

Legend:

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

    r396 r399  
    22  \file 
    33  \brief UI (user info) class for loading/saving objects from/to configuration files.   
    4   It is designed over with an use of 'libconfig � C/C++ Configuration File Library' 
     4  It is designed with use of libconfig C/C++ Configuration File Library 
    55  \author Vaclav Smidl. 
    66 
     
    7373                return message.c_str(); 
    7474        } 
     75        ~UIException() throw() {}; 
    7576}; 
    7677 
  • library/bdm/stat/merger.cpp

    r395 r399  
    223223        } 
    224224 
     225        // DEFAULTS FOR MERGER_BASE  
     226        const MERGER_METHOD merger_base::DFLT_METHOD=LOGNORMAL; 
     227        const double merger_base::DFLT_beta=1.2; 
     228        // DEFAULTS FOR MERGER_MIX 
     229        const int merger_mix::DFLT_Ncoms=10; 
     230        const double merger_mix::DFLT_effss_coef=0.5; 
     231 
    225232} 
  • library/bdm/stat/merger.h

    r395 r399  
    5959                //! switch of the methoh used for merging 
    6060                MERGER_METHOD METHOD; 
     61                //! Default for METHOD 
     62                static const MERGER_METHOD DFLT_METHOD; 
     63                 
    6164                //!Prior on the log-normal merging model 
    6265                double beta; 
    63  
     66                //! default for beta 
     67                static const double DFLT_beta; 
     68                 
    6469                //! Projection to empirical density (could also be piece-wise linear) 
    6570                eEmp eSmp; 
     
    162167                } 
    163168                //! Set internal parameters used in approximation 
    164                 void set_method (MERGER_METHOD MTH, double beta0 = 0.0) { 
     169                void set_method (MERGER_METHOD MTH=DFLT_METHOD, double beta0 = DFLT_beta) { 
    165170                        METHOD = MTH; 
    166171                        beta = beta0; 
     
    307312                //! stop after niter iterations 
    308313                int stop_niter; 
     314                 
     315                //! default value for Ncoms 
     316                static const int DFLT_Ncoms; 
     317                //! default value for efss_coef; 
     318                static const double DFLT_effss_coef; 
    309319 
    310320        public: 
     
    319329                } 
    320330                //! Set internal parameters used in approximation 
    321                 void set_parameters (int Ncoms0 = 10, double effss_coef0 = 0.5) { 
     331                void set_parameters (int Ncoms0 = DFLT_Ncoms, double effss_coef0 = DFLT_effss_coef) { 
    322332                        Ncoms = Ncoms0; 
    323333                        effss_coef = effss_coef0;