Changeset 357 for bdm/stat/libEF.h

Show
Ignore:
Timestamp:
06/08/09 02:15:30 (15 years ago)
Author:
mido
Message:

mnoho zmen:
1) presun FindXXX modulu do \system
2) zalozeni dokumentace \doc\local\library_structure.dox
3) presun obsahu \tests\UI primo do \tests
4) namisto \INSTALL zalozen \install.html, je to vhodnejsi pro uzivatele WINDOWS, a snad i obecne
5) snaha o predelani veskerych UI podle nove koncepce, soubory pmsm_ui.h, arx_ui.h, KF_ui.h, libDS_ui.h, libEF_ui.h a loggers_ui.h ponechavam
jen zdokumentacnich duvodu, nic by na nich jiz nemelo zaviset, a po zkontrolovani spravnosti provedenych uprav by mely byt smazany
6) predelani estimatoru tak, aby fungoval s novym UI konceptem
7) vytazeni tridy bdmroot do samostatneho souboru \bdm\bdmroot.h
8) pridana dokumentace pro zacleneni programu ASTYLE do Visual studia, ASTYLE pridan do instalacniho balicku pro Windows

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • bdm/stat/libEF.h

    r330 r357  
    1717#include "libBM.h" 
    1818#include "../math/chmat.h" 
    19 //#include <std> 
     19#include "../user_info.h" 
    2020 
    2121namespace bdm 
     
    515515                        void set_parameters ( fnc* g0, const sq_T &R0 ) {g=g0; epdf.set_parameters ( zeros ( g->dimension() ), R0 );} 
    516516                        void condition ( const vec &cond ) {mu=g->eval ( cond );}; 
    517         }; 
     517 
     518 
     519                        /*! UI for mgnorm 
     520 
     521                        The mgnorm is constructed from a structure with fields: 
     522                        \code 
     523                        system = { 
     524                                type = "mgnorm"; 
     525                                // function for mean value evolution 
     526                                g = {type="fnc"; ... } 
     527 
     528                                // variance 
     529                                R = [1, 0, 
     530                                         0, 1]; 
     531                                // --OR -- 
     532                                dR = [1, 1]; 
     533 
     534                                // == OPTIONAL == 
     535 
     536                                // description of y variables 
     537                                y = {type="rv"; names=["y", "u"];}; 
     538                                // description of u variable 
     539                                u = {type="rv"; names=[];} 
     540                        }; 
     541                        \endcode 
     542 
     543                        Result if 
     544                        */ 
     545 
     546                        void from_setting( const Setting &root )  
     547                        {        
     548                                fnc* g = UI::build<fnc>( root, "g" ); 
     549 
     550                                mat R; 
     551                                if ( root.exists( "dR" ) ) 
     552                                { 
     553                                        vec dR; 
     554                                        UI::get( dR, root, "dR" ); 
     555                                        R=diag(dR); 
     556                                } 
     557                                else  
     558                                        UI::get( R, root, "R");                                  
     559                 
     560                                set_parameters(g,R); 
     561                        } 
     562 
     563                        /*void mgnorm::to_setting( Setting &root ) const 
     564                        {        
     565                                Transport::to_setting( root ); 
     566 
     567                                Setting &kilometers_setting = root.add("kilometers", Setting::TypeInt ); 
     568                                kilometers_setting = kilometers; 
     569 
     570                                UI::save( passengers, root, "passengers" ); 
     571                        }*/ 
     572 
     573        }; 
     574 
     575        UIREGISTER(mgnorm<chmat>); 
     576 
    518577 
    519578        /*! (Approximate) Student t density with linear function of mean value 
     
    630689        }; 
    631690 
     691 
    632692        /*! 
    633693        \brief  Gamma random walk around a fixed point 
     
    699759                                migamma::condition ( mean ); 
    700760                        }; 
    701         }; 
     761 
     762                        /*! UI for migamma_ref 
     763 
     764                        The migamma_ref is constructed from a structure with fields: 
     765                        \code 
     766                        system = { 
     767                                type = "migamma_ref"; 
     768                                ref = [1e-5; 1e-5; 1e-2 1e-3];            // reference vector 
     769                                l = 0.999;                                // constant l 
     770                                k = 0.1;                                  // constant k 
     771                                 
     772                                // == OPTIONAL == 
     773                                // description of y variables 
     774                                y = {type="rv"; names=["y", "u"];}; 
     775                                // description of u variable 
     776                                u = {type="rv"; names=[];} 
     777                        }; 
     778                        \endcode 
     779 
     780                        Result if 
     781                         */ 
     782                        void from_setting( const Setting &root ); 
     783 
     784                        // TODO dodelat void to_setting( Setting &root ) const; 
     785        }; 
     786 
     787 
     788        UIREGISTER(migamma_ref); 
    702789 
    703790        /*! Log-Normal probability density 
     
    753840                                mu=log ( val )-sig2;//elem_mult ( refl,pow ( val,l ) ); 
    754841                        }; 
    755         }; 
     842 
     843                        /*! UI for mlognorm 
     844 
     845                        The mlognorm is constructed from a structure with fields: 
     846                        \code 
     847                        system = { 
     848                                type = "mlognorm"; 
     849                                k = 0.1;                                  // constant k 
     850                                mu0 = [1., 1.]; 
     851                                 
     852                                // == OPTIONAL == 
     853                                // description of y variables 
     854                                y = {type="rv"; names=["y", "u"];}; 
     855                                // description of u variable 
     856                                u = {type="rv"; names=[];} 
     857                        }; 
     858                        \endcode 
     859 
     860                         */ 
     861                        void from_setting( const Setting &root ); 
     862 
     863                        // TODO dodelat void to_setting( Setting &root ) const; 
     864 
     865        }; 
     866         
     867        UIREGISTER(mlognorm); 
    756868 
    757869        /*! inverse Wishart density defined on Choleski decomposition