Show
Ignore:
Timestamp:
01/05/10 22:19:49 (14 years ago)
Author:
smidl
Message:

cleanups & stuff for SYSID like estimation

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • library/bdm/stat/exp_family.h

    r750 r760  
    14221422        }; 
    14231423        virtual void    validate (){ 
    1424           bdm_assert ( n > 0, "Empty samples" ); 
    1425           epdf::validate ( samples ( 0 ).length() ); 
     1424          bdm_assert (samples.length()==w.length(),"samples and weigths are of different lengths"); 
     1425          n = w.length(); 
     1426          if (n>0) 
     1427                epdf::validate ( samples ( 0 ).length() ); 
    14261428        } 
    14271429        //! Potentially dangerous, use with care. 
     
    14831485        //! For this class, qbounds are minimum and maximum value of the population! 
    14841486        void qbounds ( vec &lb, vec &ub, double perc = 0.95 ) const; 
    1485 }; 
     1487 
     1488        void to_setting ( Setting &set ) const { 
     1489                epdf::to_setting( set ); 
     1490                UI::save ( samples, set, "samples" ); 
     1491                UI::save ( w, set, "w" ); 
     1492        } 
     1493 
     1494        void from_setting ( const Setting &set ) { 
     1495                epdf::from_setting( set ); 
     1496                 
     1497                UI::get( samples, set, "samples", UI::compulsory ); 
     1498                UI::get ( w, set, "w", UI::compulsory ); 
     1499                validate(); 
     1500        } 
     1501 
     1502}; 
     1503UIREGISTER(eEmp); 
    14861504 
    14871505