APRILContent
Algorithm of Particle Reconstruction for ILC - implementation with PandoraSDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations
Public Member Functions | Private Attributes | List of all members
april_content::QuickUnion Class Reference

QuickUnion class. More...

#include <QuickUnion.h>

Public Member Functions

 QuickUnion (const unsigned nBranches)
 Constructor. More...
 
int Count () const
 Get the current number of target indices. More...
 
unsigned int Find (unsigned p)
 Find the current target index for provided index p. More...
 
bool Connected (unsigned p, unsigned q)
 Whether two original indices are now connected. More...
 
void Unite (unsigned p, unsigned q)
 Unite two indices. More...
 

Private Attributes

std::vector< unsigned > m_id
 Stores target index for each original index.
 
int m_count
 The current number of target indices.
 

Detailed Description

QuickUnion class.

Constructor & Destructor Documentation

april_content::QuickUnion::QuickUnion ( const unsigned  nBranches)
inline

Constructor.

Parameters
nBranchesthe number of original indices

Member Function Documentation

bool april_content::QuickUnion::Connected ( unsigned  p,
unsigned  q 
)
inline

Whether two original indices are now connected.

Parameters
pindex p
qindex q
Returns
boolean
int april_content::QuickUnion::Count ( ) const
inline

Get the current number of target indices.

Returns
the current number of target indices
unsigned int april_content::QuickUnion::Find ( unsigned  p)
inline

Find the current target index for provided index p.

Parameters
pindex p
void april_content::QuickUnion::Unite ( unsigned  p,
unsigned  q 
)
inline

Unite two indices.

Parameters
pindex p
qindex q

The documentation for this class was generated from the following file: