fastjet::ClosestPair2DBase Class Reference

abstract base class for finding closest pairs in 2D More...

#include <ClosestPair2DBase.hh>

Inheritance diagram for fastjet::ClosestPair2DBase:

Inheritance graph
fastjet::ClosestPair2D
[legend]
List of all members.

Public Member Functions

virtual void closest_pair (unsigned int &ID1, unsigned int &ID2, double &distance2) const=0
 provides the IDs of the closest pair as well as the squared distance between them
virtual void remove (unsigned int ID)=0
 removes the entry labelled by ID from the object;
virtual unsigned int insert (const Coord2D &position)=0
 inserts the position into the closest pair structure and returns the ID that has been allocated for the object.
virtual unsigned int replace (unsigned int ID1, unsigned int ID2, const Coord2D &position)
 replaces the specified ID1 and ID2 with something at a new position assuming that ID1 and ID2 are in sequence wrt position; it returns the ID of the new object.
virtual void replace_many (const std::vector< unsigned int > &IDs_to_remove, const std::vector< Coord2D > &new_positions, std::vector< unsigned int > &new_IDs)
 replaces IDs_to_remove with points at the new_positions indicating the IDs allocated to the new points in new_IDs
virtual unsigned int size ()=0
virtual ~ClosestPair2DBase ()

Detailed Description

abstract base class for finding closest pairs in 2D

Definition at line 83 of file ClosestPair2DBase.hh.


Constructor & Destructor Documentation

virtual fastjet::ClosestPair2DBase::~ClosestPair2DBase (  )  [inline, virtual]

Definition at line 122 of file ClosestPair2DBase.hh.

00122 {};


Member Function Documentation

virtual void fastjet::ClosestPair2DBase::closest_pair ( unsigned int &  ID1,
unsigned int &  ID2,
double &  distance2 
) const [pure virtual]

provides the IDs of the closest pair as well as the squared distance between them

Implemented in fastjet::ClosestPair2D.

virtual void fastjet::ClosestPair2DBase::remove ( unsigned int  ID  )  [pure virtual]

removes the entry labelled by ID from the object;

Implemented in fastjet::ClosestPair2D.

virtual unsigned int fastjet::ClosestPair2DBase::insert ( const Coord2D position  )  [pure virtual]

inserts the position into the closest pair structure and returns the ID that has been allocated for the object.

Implemented in fastjet::ClosestPair2D.

virtual unsigned int fastjet::ClosestPair2DBase::replace ( unsigned int  ID1,
unsigned int  ID2,
const Coord2D position 
) [inline, virtual]

replaces the specified ID1 and ID2 with something at a new position assuming that ID1 and ID2 are in sequence wrt position; it returns the ID of the new object.

..

Reimplemented in fastjet::ClosestPair2D.

Definition at line 100 of file ClosestPair2DBase.hh.

00101                                                          {
00102     remove(ID1); 
00103     remove(ID2); 
00104     unsigned new_ID = insert(position);
00105     return(new_ID);
00106   };

virtual void fastjet::ClosestPair2DBase::replace_many ( const std::vector< unsigned int > &  IDs_to_remove,
const std::vector< Coord2D > &  new_positions,
std::vector< unsigned int > &  new_IDs 
) [inline, virtual]

replaces IDs_to_remove with points at the new_positions indicating the IDs allocated to the new points in new_IDs

Reimplemented in fastjet::ClosestPair2D.

Definition at line 110 of file ClosestPair2DBase.hh.

00112                                                           {
00113     for(unsigned i = 0; i < IDs_to_remove.size(); i++) {
00114       remove(IDs_to_remove[i]);}
00115     new_IDs.resize(0);
00116     for(unsigned i = 0; i < new_positions.size(); i++) {
00117       new_IDs.push_back(insert(new_positions[i]));}
00118   }

virtual unsigned int fastjet::ClosestPair2DBase::size (  )  [pure virtual]

Implemented in fastjet::ClosestPair2D.


The documentation for this class was generated from the following file:
Generated on Tue Dec 18 17:05:54 2007 for fastjet by  doxygen 1.5.2