Show
Ignore:
Timestamp:
08/14/09 09:03:02 (15 years ago)
Author:
vbarta
Message:

defined *_ptr wrappers of shared pointers

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • library/tests/mpdf_test.cpp

    r524 r529  
    3838        ldmat R = ldmat ( V0 ); 
    3939 
    40         shared_ptr<enorm<ldmat> > eN = new enorm<ldmat>(); 
     40        enorm_ldmat_ptr eN; 
    4141        eN->set_parameters ( mu0, R ); 
    4242 
    43         shared_ptr<mgamma> mG = new mgamma(); 
     43        mgamma_ptr mG; 
    4444        double k = 10.0; 
    4545        mG->set_parameters ( k, mu0 ); 
    4646 
    4747        mmix mMix; 
    48         Array<shared_ptr<mpdf> > mComs ( 2 ); 
     48        mpdf_array mComs ( 2 ); 
    4949 
    5050        // mmix::set_parameters requires the first mpdf to be named 
     
    5454 
    5555        eN->set_mu ( vec_2 ( 0.0, 0.0 ) ); 
    56         shared_ptr<mepdf> mEnorm = new mepdf ( eN ); 
     56        mepdf_ptr mEnorm = new mepdf ( eN ); 
    5757        mComs ( 1 ) = mEnorm; 
    5858 
    5959        mMix.set_parameters ( vec_2 ( 0.5, 0.5 ), mComs ); 
    6060 
    61         double tolerance = 0.1; 
    62  
    6361        vec tmu = 0.5 * eN->mean() + 0.5 * mu0; 
    64         check_mean ( mMix, mu0, N, tmu, tolerance ); 
     62        check_mean ( mMix, mu0, N, tmu, 0.1 ); 
    6563 
    6664        mat observedR ( "1.27572 0.778247; 0.778247 3.33129" ); 
    67         check_covariance( mMix, mu0, N, observedR, tolerance); 
     65        check_covariance( mMix, mu0, N, observedR, 0.2 ); 
    6866} 
    6967 
     
    7573        ldmat R = ldmat ( V0 ); 
    7674 
    77         shared_ptr<enorm<ldmat> > eN = new enorm<ldmat>(); 
     75        enorm_ldmat_ptr eN; 
    7876        eN->set_parameters ( mu0, R ); 
    7977 
    8078        vec a = "100000,10000"; 
    8179        vec b = a / 10.0; 
    82         shared_ptr<egamma> eG = new egamma(); 
     80        egamma_ptr eG; 
    8381        eG->set_parameters ( a, b ); 
    8482 
    85         shared_ptr<emix> eMix = new emix(); 
    86         Array<shared_ptr<epdf> > Coms ( 2 ); 
     83        emix_ptr eMix; 
     84        epdf_array Coms ( 2 ); 
    8785        Coms ( 0 ) = eG; 
    8886        Coms ( 1 ) = eN;