Show
Ignore:
Timestamp:
11/13/09 09:15:50 (15 years ago)
Author:
mido
Message:

stresssuite - halfway point

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • library/tests/testsuite/emix_test.cpp

    r717 r721  
    44#include "UnitTest++.h" 
    55#include "../test_util.h" 
     6#include "../pdf_harness.h" 
     7 
    68 
    79const double epsilon = 0.00001; 
     
    1214 
    1315static void check_covariance ( emix &distrib_obj, int nsamples, const mat &R, double tolerance); 
     16 
     17TEST ( emix_test ) { 
     18        pdf_harness::test_config ( "emix.cfg" ); 
     19} 
    1420 
    1521TEST ( emix_1_test ) { 
     
    8894} 
    8995 
    90 TEST ( emix_2_test ) { 
    91         int N = 10000; // number of samples 
    92         vec mu0 ( "1.5 1.7" ); 
    93         mat V0 ( "1.2 0.3; 0.3 5" ); 
    94         ldmat R = ldmat ( V0 ); 
    95  
    96         enorm_ldmat_ptr eN; 
    97         eN->set_parameters ( mu0, R ); 
    98  
    99         vec a = "100000,10000"; 
    100         vec b = a / 10.0; 
    101         egamma_ptr eG; 
    102         eG->set_parameters ( a, b ); 
    103  
    104         emix eMix; 
    105         epdf_array Coms ( 2 ); 
    106         Coms ( 0 ) = eG; 
    107         Coms ( 1 ) = eN; 
    108  
    109         eMix.set_parameters ( vec_2 ( 0.5, 0.5 ), Coms ); 
    110         check_mean ( eMix, N, eMix.mean(), 0.1 ); 
    111 } 
    11296 
    11397static void check_mean ( emix &distrib_obj, int nsamples, const vec &mean, double tolerance ) {