Changeset 1035

Show
Ignore:
Timestamp:
06/03/10 08:26:03 (14 years ago)
Author:
dedecius
Message:

accepted jp patches

Location:
library/bdm/estim
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • library/bdm/estim/arx.cpp

    r1030 r1035  
    299299    int dimV = est._V().cols(); 
    300300    int nparams = dimV - 1;                 // number of parameters 
    301     //kamil: int nalternatives = pow(2, nparams);    // number of alternatives 
    302301    int nalternatives = 1 << nparams;    // number of alternatives 
    303302 
     
    306305    int i, j, period, idx_from, idx_to, start, end; 
    307306    for(i = 0; i < nparams; i++) { 
    308         // kamil: idx_from = pow(2, i); 
    309                 // kamil: idx_to = 2 * pow(2, i) - 1; 
    310                 // kamil: period = pow(2, i+1); 
    311         // jp: what about this? 
    312307                idx_from = 1 << i; 
    313308                period   = ( idx_from << 1 ); 
    314309        idx_to   = period - 1; 
    315         // end:jp 
    316310                j = 0; 
    317311        start = idx_from; 
    318312        end = idx_to; 
    319         // kamil: while(start < pow(2, nparams)) { 
    320313                while ( start < nalternatives ) { 
    321314            perm_matrix.set_submatrix(start, end, i, i, 0); 
     
    344337        } 
    345338 
    346         // kamil: nalternatives_cond = sum(vec_alt) + 1; 
    347339        nalternatives_cond = (int) sum(vec_alt) + 1; 
    348340        ivec vec_perm(0);                   // permutation vector 
  • library/bdm/estim/arx.h

    r1030 r1035  
    263263        void validate() { 
    264264                ARX::validate(); 
    265                 // kamil: int philen = pow(2, est._V().cols() - 1); 
    266                 // but under win32 this call is ambiguous, and moreover it uses 
    267                 // floats to compute 2^n ... 
    268265                int philen = 1 << (est._V().cols() - 1); 
    269266                rvc.add ( RV ( "{phi }", vec_1(philen) ) ); // pocet 2^parametru