Show
Ignore:
Timestamp:
07/29/09 15:39:19 (15 years ago)
Author:
vbarta
Message:

removed enorm<sq_T>::sample(int) - now spelled sample_m, inherited

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • library/tests/enorm_test.cpp

    r448 r450  
    5656    } 
    5757} 
    58  
    59 TEST(test_enorm_sample) { 
    60     RNG_randomize(); 
    61  
    62     // Setup model 
    63     vec mu("1.1 -1"); 
    64     ldmat R(mat("1 -0.5; -0.5 2")); 
    65  
    66     RV x("{x }"); 
    67     RV y("{y }"); 
    68  
    69     enorm<ldmat> E; 
    70     E.set_rv(concat(x, y)); 
    71     E.set_parameters(mu, R); 
    72  
    73     int n = 1000; 
    74     vec ll(n); 
    75     mat smp = E.sample(1000); 
    76     vec emu = sum(smp, 2) / n; 
    77     CHECK_CLOSE(mu, emu, 0.3); 
    78  
    79     mat er = (smp * smp.T()) / n - outer_product(emu, emu); 
    80     CHECK_CLOSE(R.to_mat(), er, 0.3); 
    81 }