Changeset 606 for library

Show
Ignore:
Timestamp:
09/10/09 17:38:09 (15 years ago)
Author:
smidl
Message:

ticket 12

Location:
library/bdm
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • library/bdm/CMakeLists.txt

    r586 r606  
    66        math/functions.cpp math/functions.h) 
    77SET(bdm_stat stat/exp_family.cpp stat/exp_family.h stat/emix.cpp stat/emix.h stat/merger.h stat/merger.cpp) 
    8 SET(bdm_estim estim/kalman.cpp estim/kalman.h estim/particles.cpp estim/particles.h estim/arx.cpp estim/arx.h estim/mixtures.cpp estim/mixtures.h) 
     8SET(bdm_estim estim/kalman.cpp estim/kalman.h estim/particles.cpp estim/particles.h estim/arx.cpp estim/arx.h estim/arx_straux.cpp estim/mixtures.cpp estim/mixtures.h) 
    99SET(bdm_ctrl design/ctrlbase.cpp design/ctrlbase.h) 
    1010SET(bdm_user_info base/libconfig/libconfigcpp.cc base/libconfig/grammar.c base/libconfig/libconfig.c base/libconfig/scanner.c  
  • library/bdm/estim/arx_straux.cpp

    r585 r606  
    33namespace bdm { 
    44 
    5 ivec straux1(ldmat Ld, double nu, ldmat Ld0, double nu0/*, ivec belief, int nbest, int max_nrep, double lambda, int order_k, ivec &rgrsout*/);{ 
     5  struct str_aux { 
     6        vec d0; 
     7        double nu0; 
     8        mat L0; 
     9        mat L; 
     10        vec d; 
     11        double nu; 
     12        ivec strL;                 // Current structure of L and d 
     13        ivec strRgr;               // Structure elements currently inside regressor (after regressand) 
     14        ivec strMis;               // structure elements, that are currently outside regressor (before regressand) 
     15        int posit1;                // regressand position 
     16        int nbits;                                 // number of bits available in double 
     17        int bitstr;  
     18        double loglik;          // loglikelihood 
     19  }; 
     20   
     21ivec straux1(ldmat Ld, double nu, ldmat Ld0, double nu0, ivec belief, int nbest, int max_nrep, double lambda, int order_k, ivec &rgrsout){ 
    622// see utia_legacy/ticket_12/ implementation and str_test.m 
    723 
    8 return ivec(); 
     24const mat &L = Ld._L(); 
     25const vec &d = Ld._D(); 
     26 
     27const mat &L0 = Ld0._L(); 
     28const vec &d0 = Ld0._D(); 
     29 
     30int n_data = d.length(); 
     31 
     32ivec belief_out = find(belief==4)+1; // we are avoiding to put this into regressor 
     33ivec belief_in  = find(belief==1)+1; // we are instantly keeping this in regressor 
     34 
     35str_aux full; 
     36 
     37full.d0  = d0; 
     38full.nu0 = nu0; 
     39full.L0  = L0; 
     40full.L   = L; 
     41full.d   = d; 
     42full.nu  = nu; 
     43full.strL = linspace(1,n_data); 
     44full.strRgr = linspace(2,n_data); 
     45full.strMis = ivec(0);                      
     46full.posit1 = 1;    
     47//full.nbits  = floor(log2(bitmax))-1;  //!!!!!!! 
     48 
    949} 
    1050 
     51 
     52 
    1153} 
  • library/bdm/estim/arx_straux.h

    r585 r606  
    1717 
    1818        //! Rplication of Ludvik Tesar original straux1 from mixtools straux1 
    19 ivec straux1(ldmat Ld, double nu, ldmat Ld0, double nu0/*, ivec belief, int nbest, int max_nrep, double lambda, int order_k, ivec &rgrsout*/); 
     19ivec straux1(ldmat Ld, double nu, ldmat Ld0, double nu0, ivec belief, int nbest, int max_nrep, double lambda, int order_k, ivec &rgrsout); 
    2020 
    2121}