39 parton (
double mpt,
double meta,
double mphi,
double me,
bool mfinal) {
pt=mpt;
eta=meta;
phi=mphi;
e=me;
final=mfinal;}
40 ~parton() {cout<<
" Parton Destructor ..."<<endl;}
53 ~shower() {cout<<
"Shower Detrcutor ..."<<endl;}
73 virtual ~shower2() {cout<<
"Shower2 Detrcutor ..."<<endl;}
102 int main (
int argc,
char* argv[])
185 auto mS=make_shared<shower2>();
188 node nnn11=mS->new_vertex(0);
189 node nnn22=mS->new_vertex(1);
190 node nnn33=mS->new_vertex(1);
191 node nnn44=mS->new_vertex(2);
192 node nnn55=mS->new_vertex(2);
193 node nnn66=mS->new_vertex(3);
194 node nnn77=mS->new_vertex(3);
195 node nnn88=mS->new_vertex(4);
197 mS->new_parton(nnn11,nnn22,unique_ptr<parton>(
new parton(100,0,0,100,
false)));
198 mS->new_parton(nnn11,nnn33,unique_ptr<parton>(
new parton(200,0,0,200,
false)));
199 mS->new_parton(nnn33,nnn44,unique_ptr<parton>(
new parton(50,0,0,50,
true)));
200 mS->new_parton(nnn33,nnn55,unique_ptr<parton>(
new parton(150,0,0,150,
false)));
201 mS->new_parton(nnn55,nnn66,unique_ptr<parton>(
new parton(80,0,0,80,
true)));
202 mS->new_parton(nnn55,nnn77,unique_ptr<parton>(
new parton(70,0,0,70,
false)));
203 mS->new_parton(nnn77,nnn88,unique_ptr<parton>(
new parton(60,0,0,60,
true)));
223 for (git0 = mS->nodes_begin(), gend0 = mS->nodes_end(); git0 != gend0; ++git0)
225 cout<<*git0<<
" "<<mS->GetNodeValue(*git0)<<
" "<<git0->
indeg()<<
" "<<git0->outdeg()<<endl;
230 for (git3 = mS->edges_begin(), gend3 = mS->edges_end(); git3 != gend3; ++git3)
232 cout<<*git3<<
" "<<mS->GetEdgeValue(*git3)<<endl;
235 list<node> ln=mS->all_nodes();
236 cout<<ln.size()<<endl;
238 list<edge> le=mS->all_edges();
239 cout<<le.size()<<endl;
248 for (itt2 = search.
begin(), endt2=search.
end(); itt2 !=endt2; ++itt2)
260 cout<<
" mS->clear()"<<endl;
264 cout<<
"Done .."<<endl;