comparison src/BTrack.cpp @ 53:338f5eb29e41

Small syntax change for array arguments so they are pointers rather than array[]. Just personal preference.
author Adam Stark <adamstark@users.noreply.github.com>
date Wed, 22 Jan 2014 01:34:04 +0000
parents 45231107c9d6
children 9699024bb3d0
comparison
equal deleted inserted replaced
52:45231107c9d6 53:338f5eb29e41
366 366
367 //cout << bperiod << endl; 367 //cout << bperiod << endl;
368 } 368 }
369 369
370 //======================================================================= 370 //=======================================================================
371 void BTrack :: adapt_thresh(float x[],int N) 371 void BTrack :: adapt_thresh(float *x,int N)
372 { 372 {
373 //int N = 512; // length of df 373 //int N = 512; // length of df
374 int i = 0; 374 int i = 0;
375 int k,t = 0; 375 int k,t = 0;
376 float x_thresh[N]; 376 float x_thresh[N];
432 } 432 }
433 } 433 }
434 } 434 }
435 435
436 //======================================================================= 436 //=======================================================================
437 void BTrack :: acf_bal(float df_thresh[]) 437 void BTrack :: acf_bal(float *df_thresh)
438 { 438 {
439 int l, n = 0; 439 int l, n = 0;
440 float sum, tmp; 440 float sum, tmp;
441 441
442 // for l lags from 0-511 442 // for l lags from 0-511
454 acf[l] = sum / (512-l); // weight by number of mults and add to acf buffer 454 acf[l] = sum / (512-l); // weight by number of mults and add to acf buffer
455 } 455 }
456 } 456 }
457 457
458 //======================================================================= 458 //=======================================================================
459 float BTrack :: mean_array(float array[],int start,int end) 459 float BTrack :: mean_array(float *array,int start,int end)
460 { 460 {
461 int i; 461 int i;
462 double sum = 0; 462 double sum = 0;
463 463
464 int length = end - start; 464 int length = end - start;
478 return 0; 478 return 0;
479 } 479 }
480 } 480 }
481 481
482 //======================================================================= 482 //=======================================================================
483 void BTrack :: normalise(float array[],int N) 483 void BTrack :: normalise(float *array,int N)
484 { 484 {
485 double sum = 0; 485 double sum = 0;
486 486
487 for (int i = 0;i < N;i++) 487 for (int i = 0;i < N;i++)
488 { 488 {