EMAN2
Functions
baldwinweights.cpp File Reference
#include "emdata.h"
#include "util.h"
#include "transform.h"
#include <iostream>
#include <boost/shared_ptr.hpp>
Include dependency graph for baldwinweights.cpp:

Go to the source code of this file.

Functions

void test_shared_pointer ()
int main (int argc, char *argv[])

Function Documentation

int main ( int  argc,
char *  argv[] 
)

Definition at line 57 of file baldwinweights.cpp.

References test_shared_pointer().

{
//      int nx = 64;
//      int P = (int)((1.0+0.25)*nx+1);
//      float r = (float)(nx+1)/(float)P;
//      int mFreqCutoff = 2;
//      float mDFreq = 0.2;
        
//      float* W = Util::getBaldwinGridWeights(mFreqCutoff, P, r, mDFreq,0.5,0.2);
//      cout << "Test 2" << endl;
//      W = Util::getBaldwinGridWeights(3, 35, 0.9, 1,0.5,0.2);
        
        test_shared_pointer();
//      delete [] W;
    return 0;
}
void test_shared_pointer ( )

Definition at line 44 of file baldwinweights.cpp.

References t.

Referenced by main().

                           {
        shared_ptr<Transform> p( new Transform);
        cout << p.use_count() << endl;
        Transform* t = p.get();
        cout << p.use_count() << endl;
        shared_ptr<Transform> p2(p);
        cout << p.use_count() << endl;
        cout << p2.use_count() << endl;
        shared_ptr<Transform> p3 = p;
        cout << p.use_count() << endl;
        cout << p3.use_count() << endl;
}