Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ClosestPair2D Class Reference
+ Inheritance diagram for ClosestPair2D:
+ Collaboration diagram for ClosestPair2D:

Classes

class  Point
 
class  Shuffle
 
class  triplet
 

Public Member Functions

 ClosestPair2D (const std::vector< Coord2D > &positions, const Coord2D &left_corner, const Coord2D &right_corner)
 
 ClosestPair2D (const std::vector< Coord2D > &positions, const Coord2D &left_corner, const Coord2D &right_corner, const unsigned int max_size)
 
void closest_pair (unsigned int &ID1, unsigned int &ID2, double &distance2) const
 
void remove (unsigned int ID)
 
unsigned int insert (const Coord2D &)
 
virtual unsigned int replace (unsigned int ID1, unsigned int ID2, const Coord2D &position)
 
virtual void replace_many (const std::vector< unsigned int > &IDs_to_remove, const std::vector< Coord2D > &new_positions, std::vector< unsigned int > &new_IDs)
 
void print_tree_depths (std::ostream &outdev) const
 
unsigned int size ()
 
- Public Member Functions inherited from ClosestPair2DBase
virtual ~ClosestPair2DBase ()
 

Private Types

typedef SearchTree< ShuffleTree
 
typedef Tree::circulator circulator
 
typedef Tree::const_circulator const_circulator
 

Private Member Functions

void _initialize (const std::vector< Coord2D > &positions, const Coord2D &left_corner, const Coord2D &right_corner, const unsigned int max_size)
 
void _add_label (Point *point, unsigned int review_flag)
 
void _set_label (Point *point, unsigned int review_flag)
 
void _deal_with_points_to_review ()
 
void _remove_from_search_tree (Point *point_to_remove)
 
void _insert_into_search_tree (Point *new_point)
 
void _point2shuffle (Point &, Shuffle &, unsigned int shift)
 
int _ID (const Point *) const
 

Private Attributes

triplet< SharedPtr< Tree > > _trees
 
SharedPtr< MinHeap_heap
 
std::vector< Point_points
 
std::stack< Point * > _available_points
 
std::vector< Point * > _points_under_review
 
Coord2D _left_corner
 
double _range
 
triplet< unsigned int > _shifts
 
triplet< unsigned int > _rel_shifts
 
unsigned int _cp_search_range
 

Static Private Attributes

static const unsigned int _nshift = 3
 
static const unsigned int _remove_heap_entry = 1
 
static const unsigned int _review_heap_entry = 2
 
static const unsigned int _review_neighbour = 4
 

Detailed Description

Definition at line 727 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 727 of file fjcore.cc

Member Typedef Documentation

Definition at line 774 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 774 of file fjcore.cc

Definition at line 775 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 775 of file fjcore.cc

Definition at line 773 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 773 of file fjcore.cc

Constructor & Destructor Documentation

ClosestPair2D::ClosestPair2D ( const std::vector< Coord2D > &  positions,
const Coord2D left_corner,
const Coord2D right_corner 
)
inline

Definition at line 729 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 729 of file fjcore.cc

References _initialize().

+ Here is the call graph for this function:

ClosestPair2D::ClosestPair2D ( const std::vector< Coord2D > &  positions,
const Coord2D left_corner,
const Coord2D right_corner,
const unsigned int  max_size 
)
inline

Definition at line 733 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 733 of file fjcore.cc

References _initialize().

+ Here is the call graph for this function:

Member Function Documentation

void ClosestPair2D::_add_label ( Point point,
unsigned int  review_flag 
)
inlineprivate

Definition at line 1247 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 1247 of file fjcore.cc

References ClosestPair2D::Point::review_flag.

void ClosestPair2D::_deal_with_points_to_review ( )
private

Definition at line 1292 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 1292 of file fjcore.cc

References assert, ClosestPair2D::Point::circ, ClosestPair2D::Point::distance2(), i, Acts::UnitConstants::min, ClosestPair2D::Point::neighbour, ClosestPair2D::Point::neighbour_dist2, ClosestPair2D::Point::review_flag, and size.

+ Here is the call graph for this function:

int ClosestPair2D::_ID ( const Point point) const
inlineprivate

Definition at line 812 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 812 of file fjcore.cc

References _points.

void ClosestPair2D::_initialize ( const std::vector< Coord2D > &  positions,
const Coord2D left_corner,
const Coord2D right_corner,
const unsigned int  max_size 
)
private

Definition at line 1184 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 1184 of file fjcore.cc

References assert, ClosestPair2D::Point::circ, ClosestPair2D::Point::distance2(), i, Acts::UnitConstants::min, ClosestPair2D::Point::neighbour, ClosestPair2D::Point::neighbour_dist2, Acts::Experimental::detail::BlueprintHelper::sort(), start, Coord2D::x, and Coord2D::y.

Referenced by ClosestPair2D().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ClosestPair2D::_insert_into_search_tree ( Point new_point)
private

Definition at line 1362 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 1362 of file fjcore.cc

References ClosestPair2D::Point::circ, ClosestPair2D::Point::distance2(), i, Acts::UnitConstants::min, ClosestPair2D::Point::neighbour, ClosestPair2D::Point::neighbour_dist2, and size.

+ Here is the call graph for this function:

void ClosestPair2D::_point2shuffle ( Point point,
Shuffle shuffle,
unsigned int  shift 
)
private

Definition at line 1166 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 1166 of file fjcore.cc

References assert, ClosestPair2D::Point::coord, ClosestPair2D::Shuffle::point, Coord2D::x, ClosestPair2D::Shuffle::x, Coord2D::y, and ClosestPair2D::Shuffle::y.

void ClosestPair2D::_remove_from_search_tree ( Point point_to_remove)
private

Definition at line 1260 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 1260 of file fjcore.cc

References ClosestPair2D::Point::circ, ClosestPair2D::Point::distance2(), i, Acts::UnitConstants::min, ClosestPair2D::Point::neighbour, ClosestPair2D::Point::neighbour_dist2, SearchTree< T >::circulator::next(), and size.

+ Here is the call graph for this function:

void ClosestPair2D::_set_label ( Point point,
unsigned int  review_flag 
)
inlineprivate

Definition at line 1251 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 1251 of file fjcore.cc

References ClosestPair2D::Point::review_flag.

void ClosestPair2D::closest_pair ( unsigned int &  ID1,
unsigned int &  ID2,
double distance2 
) const
virtual

Implements ClosestPair2DBase.

Definition at line 1240 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 1240 of file fjcore.cc

References swap().

Referenced by ClusterSequence::_CP2DChan_cluster(), and ClusterSequence::_CP2DChan_limited_cluster().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

unsigned int ClosestPair2D::insert ( const Coord2D new_coord)
virtual

Implements ClosestPair2DBase.

Definition at line 1323 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 1323 of file fjcore.cc

References assert, and ClosestPair2D::Point::coord.

void ClosestPair2D::print_tree_depths ( std::ostream &  outdev) const
inline

Definition at line 747 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 747 of file fjcore.cc

References _trees.

void ClosestPair2D::remove ( unsigned int  ID)
virtual

Implements ClosestPair2DBase.

Definition at line 1255 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 1255 of file fjcore.cc

unsigned int ClosestPair2D::replace ( unsigned int  ID1,
unsigned int  ID2,
const Coord2D position 
)
virtual

Reimplemented from ClosestPair2DBase.

Definition at line 1332 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 1332 of file fjcore.cc

References ClosestPair2D::Point::coord, and position.

Referenced by ClusterSequence::_CP2DChan_cluster().

+ Here is the caller graph for this function:

void ClosestPair2D::replace_many ( const std::vector< unsigned int > &  IDs_to_remove,
const std::vector< Coord2D > &  new_positions,
std::vector< unsigned int > &  new_IDs 
)
virtual

Reimplemented from ClosestPair2DBase.

Definition at line 1345 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 1345 of file fjcore.cc

References ClosestPair2D::Point::coord, and i.

Referenced by ClusterSequence::_CP2DChan_limited_cluster().

+ Here is the caller graph for this function:

unsigned int ClosestPair2D::size ( void  )
inlinevirtual

Implements ClosestPair2DBase.

Definition at line 815 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 815 of file fjcore.cc

References _available_points, and _points.

Member Data Documentation

std::stack<Point *> ClosestPair2D::_available_points
private

Definition at line 779 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 779 of file fjcore.cc

Referenced by size().

unsigned int ClosestPair2D::_cp_search_range
private

Definition at line 795 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 795 of file fjcore.cc

SharedPtr<MinHeap> ClosestPair2D::_heap
private

Definition at line 777 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 777 of file fjcore.cc

Coord2D ClosestPair2D::_left_corner
private

Definition at line 790 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 790 of file fjcore.cc

const unsigned int ClosestPair2D::_nshift = 3
staticprivate

Definition at line 757 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 757 of file fjcore.cc

std::vector<Point> ClosestPair2D::_points
private

Definition at line 778 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 778 of file fjcore.cc

Referenced by _ID(), and size().

std::vector<Point *> ClosestPair2D::_points_under_review
private

Definition at line 780 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 780 of file fjcore.cc

double ClosestPair2D::_range
private

Definition at line 791 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 791 of file fjcore.cc

triplet<unsigned int> ClosestPair2D::_rel_shifts
private

Definition at line 794 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 794 of file fjcore.cc

const unsigned int ClosestPair2D::_remove_heap_entry = 1
staticprivate

Definition at line 781 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 781 of file fjcore.cc

const unsigned int ClosestPair2D::_review_heap_entry = 2
staticprivate

Definition at line 782 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 782 of file fjcore.cc

const unsigned int ClosestPair2D::_review_neighbour = 4
staticprivate

Definition at line 783 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 783 of file fjcore.cc

triplet<unsigned int> ClosestPair2D::_shifts
private

Definition at line 793 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 793 of file fjcore.cc

triplet<SharedPtr<Tree> > ClosestPair2D::_trees
private

Definition at line 776 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 776 of file fjcore.cc

Referenced by print_tree_depths().


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