Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

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:

Include dependency graph

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().

00058 {
00059 //      int nx = 64;
00060 //      int P = (int)((1.0+0.25)*nx+1);
00061 //      float r = (float)(nx+1)/(float)P;
00062 //      int mFreqCutoff = 2;
00063 //      float mDFreq = 0.2;
00064         
00065 //      float* W = Util::getBaldwinGridWeights(mFreqCutoff, P, r, mDFreq,0.5,0.2);
00066 //      cout << "Test 2" << endl;
00067 //      W = Util::getBaldwinGridWeights(3, 35, 0.9, 1,0.5,0.2);
00068         
00069         test_shared_pointer();
00070 //      delete [] W;
00071     return 0;
00072 }

void test_shared_pointer  ) 
 

Definition at line 44 of file baldwinweights.cpp.

References t.

Referenced by main().

00044                            {
00045         shared_ptr<Transform> p( new Transform);
00046         cout << p.use_count() << endl;
00047         Transform* t = p.get();
00048         cout << p.use_count() << endl;
00049         shared_ptr<Transform> p2(p);
00050         cout << p.use_count() << endl;
00051         cout << p2.use_count() << endl;
00052         shared_ptr<Transform> p3 = p;
00053         cout << p.use_count() << endl;
00054         cout << p3.use_count() << endl;
00055 }


Generated on Tue Jun 11 13:46:27 2013 for EMAN2 by  doxygen 1.3.9.1