Changeset 461 for library/tests

Show
Ignore:
Timestamp:
07/31/09 13:06:49 (15 years ago)
Author:
vbarta
Message:

mpdf (& its dependencies) reformat: now using shared_ptr, moved virtual method bodies to .cpp

Location:
library/tests
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • library/tests/emix_test.cpp

    r454 r461  
     1#include "shared_ptr.h" 
    12#include "stat/exp_family.h" 
    23#include "stat/emix.h" 
     4 
    35using namespace bdm; 
    46 
     
    8082        cout << "original empirical variance: " <<Er <<endl; 
    8183 
    82         epdf* Mg = (epdf*)M2.marginal ( y ); 
     84        shared_ptr<epdf> Mg(dynamic_cast<epdf *>(M2.marginal(y))); 
    8385        mpdf* Cn = (mpdf*)M2.condition ( x ); 
    8486 
  • library/tests/epdf_harness.cpp

    r458 r461  
    8080        mat smp = hepdf->sample_m(nsamples); 
    8181        int n = smp.cols(); 
    82         vec Emu = smp * ones(n) / n; 
    83         mat Er = (smp*smp.transpose())/n - outer_product(Emu,Emu); 
    84         CHECK_CLOSE_EX(mean, Emu, tolerance); 
    85         CHECK_CLOSE_EX(R, Er, tolerance); 
     82        vec emu = smp * ones(n) / n; 
     83        mat er = (smp * smp.T()) / n - outer_product(emu, emu); 
     84        CHECK_CLOSE_EX(mean, emu, tolerance); 
     85        CHECK_CLOSE_EX(R, er, tolerance); 
    8686    } 
    8787} 
  • library/tests/testSmp.cpp

    r450 r461  
    9494         
    9595        Smp = mMix.samplecond_m(mu0,N); 
    96         disp(mMix._epdf().mean(),zeros(2),Smp); 
     96        disp(mMix.e()->mean(), zeros(2), Smp); 
    9797 
    9898        cout << "======= EProd ======== " << endl; 
  • library/tests/test_kalman_QR.cpp

    r386 r461  
    6464        KF_QR.set_parameters(&evolQR,&evolQR,100); 
    6565        evolQR.condition("1 1 1"); 
    66         KF_QR.set_statistics(evolQR._e(), &KF); 
     66        KF_QR.set_statistics(evolQR.e(), &KF); 
    6767        const epdf& mpost=KF_QR.posterior(); 
    6868        const epdf& mposttr=KFtr.posterior();