| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

HepMC::GenVertex::vertex_iterator Class Reference

Iterates over all vertices connected via a graph to this vertex. More...

#include <GenVertex.h>

Collaboration diagram for HepMC::GenVertex::vertex_iterator:

[legend]
List of all members.

Public Member Functions

 vertex_iterator ()
 vertex_iterator (GenVertex &vtx_root, IteratorRange range)
 used to set limits on the iteration
 vertex_iterator (GenVertex &vtx_root, IteratorRange range, std::set< const HepMC::GenVertex * > &visited_vertices)
 next constructor is intended for internal use only
 vertex_iterator (const vertex_iterator &v_iter)
 copy
virtual ~vertex_iterator ()
vertex_iteratoroperator= (const vertex_iterator &)
 make a copy
GenVertexoperator * (void) const
 return a pointer to a vertex
vertex_iteratoroperator++ (void)
 Pre-fix increment.
vertex_iterator operator++ (int)
 Post-fix increment.
bool operator== (const vertex_iterator &) const
 equality
bool operator!= (const vertex_iterator &) const
 inequality
GenVertexvertex_root () const
 vertex that this iterator begins from
IteratorRange range () const
 iterator range
void copy_with_own_set (const vertex_iterator &v_iter, std::set< const HepMC::GenVertex * > &visited_vertices)
 intended for internal use only.

Protected Member Functions

GenVertexfollow_edge_ ()
 non-null if recursive iter. created
void copy_recursive_iterator_ (const vertex_iterator *recursive_v_iter)
 copy recursive iterator

Private Attributes

GenVertexm_vertex
IteratorRange m_range
std::set< const HepMC::GenVertex * > * m_visited_vertices
bool m_it_owns_set
edge_iterator m_edge
vertex_iteratorm_recursive_iterator

Detailed Description

Iterates over all vertices connected via a graph to this vertex.

this is made friend to that it can access protected edge iterator the range can be IteratorRange= ( parents, children, family, ancestors, descendants, relatives ) example for range=descendants the iterator will return all vertices which are children (connected by an outgoing particle edge), grandchildren, great-grandchildren, etc. of this vertex In all cases the iterator always returns this vertex (returned last). The algorithm is accomplished by converting the graph to a tree (by "chopping" the edges connecting to an already visited vertex) and returning the vertices in POST ORDER traversal.

Definition at line 236 of file GenVertex.h.


Constructor & Destructor Documentation

HepMC::GenVertex::vertex_iterator::vertex_iterator (  ) 

HepMC::GenVertex::vertex_iterator::vertex_iterator ( GenVertex vtx_root,
IteratorRange  range 
)

used to set limits on the iteration

HepMC::GenVertex::vertex_iterator::vertex_iterator ( GenVertex vtx_root,
IteratorRange  range,
std::set< const HepMC::GenVertex * > &  visited_vertices 
)

next constructor is intended for internal use only

HepMC::GenVertex::vertex_iterator::vertex_iterator ( const vertex_iterator v_iter  ) 

copy

virtual HepMC::GenVertex::vertex_iterator::~vertex_iterator (  )  [virtual]


Member Function Documentation

vertex_iterator& HepMC::GenVertex::vertex_iterator::operator= ( const vertex_iterator  ) 

make a copy

GenVertex* HepMC::GenVertex::vertex_iterator::operator * ( void   )  const

return a pointer to a vertex

vertex_iterator& HepMC::GenVertex::vertex_iterator::operator++ ( void   ) 

Pre-fix increment.

vertex_iterator HepMC::GenVertex::vertex_iterator::operator++ ( int   ) 

Post-fix increment.

bool HepMC::GenVertex::vertex_iterator::operator== ( const vertex_iterator  )  const [inline]

equality

Definition at line 450 of file GenVertex.h.

00451                                          {
00452         return **this == *a; 
00453     }

bool HepMC::GenVertex::vertex_iterator::operator!= ( const vertex_iterator  )  const [inline]

inequality

Definition at line 455 of file GenVertex.h.

00456                                          {
00457         return !(**this == *a); 
00458     }

GenVertex * HepMC::GenVertex::vertex_iterator::vertex_root (  )  const [inline]

vertex that this iterator begins from

Definition at line 460 of file GenVertex.h.

00460                                                                   {
00461         return m_vertex; 
00462     }

IteratorRange HepMC::GenVertex::vertex_iterator::range (  )  const [inline]

iterator range

Definition at line 464 of file GenVertex.h.

00464                                                                {
00465         return m_range; 
00466     }

void HepMC::GenVertex::vertex_iterator::copy_with_own_set ( const vertex_iterator v_iter,
std::set< const HepMC::GenVertex * > &  visited_vertices 
)

intended for internal use only.

GenVertex* HepMC::GenVertex::vertex_iterator::follow_edge_ (  )  [protected]

non-null if recursive iter. created

void HepMC::GenVertex::vertex_iterator::copy_recursive_iterator_ ( const vertex_iterator recursive_v_iter  )  [protected]

copy recursive iterator


Member Data Documentation

GenVertex* HepMC::GenVertex::vertex_iterator::m_vertex [private]

Definition at line 277 of file GenVertex.h.

IteratorRange HepMC::GenVertex::vertex_iterator::m_range [private]

Definition at line 278 of file GenVertex.h.

std::set<const HepMC::GenVertex*>* HepMC::GenVertex::vertex_iterator::m_visited_vertices [private]

Definition at line 279 of file GenVertex.h.

bool HepMC::GenVertex::vertex_iterator::m_it_owns_set [private]

Definition at line 280 of file GenVertex.h.

edge_iterator HepMC::GenVertex::vertex_iterator::m_edge [private]

Definition at line 282 of file GenVertex.h.

vertex_iterator* HepMC::GenVertex::vertex_iterator::m_recursive_iterator [private]

Definition at line 283 of file GenVertex.h.


The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 19:56:44 2011 for HepMC by doxygen 1.4.7