Changeset 1035
- Timestamp:
- 06/03/10 08:26:03 (15 years ago)
- Location:
- library/bdm/estim
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
library/bdm/estim/arx.cpp
r1030 r1035 299 299 int dimV = est._V().cols(); 300 300 int nparams = dimV - 1; // number of parameters 301 //kamil: int nalternatives = pow(2, nparams); // number of alternatives302 301 int nalternatives = 1 << nparams; // number of alternatives 303 302 … … 306 305 int i, j, period, idx_from, idx_to, start, end; 307 306 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?312 307 idx_from = 1 << i; 313 308 period = ( idx_from << 1 ); 314 309 idx_to = period - 1; 315 // end:jp316 310 j = 0; 317 311 start = idx_from; 318 312 end = idx_to; 319 // kamil: while(start < pow(2, nparams)) {320 313 while ( start < nalternatives ) { 321 314 perm_matrix.set_submatrix(start, end, i, i, 0); … … 344 337 } 345 338 346 // kamil: nalternatives_cond = sum(vec_alt) + 1;347 339 nalternatives_cond = (int) sum(vec_alt) + 1; 348 340 ivec vec_perm(0); // permutation vector -
library/bdm/estim/arx.h
r1030 r1035 263 263 void validate() { 264 264 ARX::validate(); 265 // kamil: int philen = pow(2, est._V().cols() - 1);266 // but under win32 this call is ambiguous, and moreover it uses267 // floats to compute 2^n ...268 265 int philen = 1 << (est._V().cols() - 1); 269 266 rvc.add ( RV ( "{phi }", vec_1(philen) ) ); // pocet 2^parametru