root/library/bdm/estim/arx_straux.cpp @ 607

Revision 607, 1.3 kB (checked in by smidl, 15 years ago)

test for ticket 12 is now part of testsuite - see tests/arx_straux_test.cpp

Line 
1#include "arx.h"
2
3namespace bdm {
4
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){
22// see utia_legacy/ticket_12/ implementation and str_test.m
23
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
49return ivec(0); //
50}
51
52
53
54}
Note: See TracBrowser for help on using the browser.