Show
Ignore:
Timestamp:
09/27/09 00:58:02 (15 years ago)
Author:
smidl
Message:

new Dirichlet random walk + numerics in egiw

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • library/bdm/stat/exp_family.cpp

    r629 r637  
    8181                     - 0.5 * dimx * ( m * log2 + 0.5 * ( dimx - 1 ) * log2pi )  - lg; 
    8282 
    83         bdm_assert_debug ( ( ( -nkG - nkW ) > -Inf ) && ( ( -nkG - nkW ) < Inf ), "ARX improper" ); 
     83//      bdm_assert_debug ( ( ( -nkG - nkW ) > -Inf ) && ( ( -nkG - nkW ) < Inf ), "ARX improper" ); 
     84if (-nkG - nkW==Inf){ 
     85        cout << "??" <<endl; 
     86} 
    8487        return -nkG - nkW; 
    8588} 
     
    260263} 
    261264 
    262 ivec eEmp::resample ( RESAMPLING_METHOD method ) { 
    263         ivec ind = zeros_i ( n ); 
     265void eEmp::resample ( ivec &ind, RESAMPLING_METHOD method ) { 
     266        ind = zeros_i ( n ); 
    264267        ivec N_babies = zeros_i ( n ); 
    265268        vec cumDist = cumsum ( w ); 
     
    334337        } 
    335338 
    336         // copy the internals according to ind 
     339// copy the internals according to ind 
    337340        for ( i = 0; i < n; i++ ) { 
    338341                if ( ind ( i ) != i ) { 
     
    341344                w ( i ) = 1.0 / n; 
    342345        } 
    343  
    344         return ind; 
    345346} 
    346347