fastjet 2.4.5
|
abstract base class for finding closest pairs in 2D More...
#include <ClosestPair2DBase.hh>
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 () |
abstract base class for finding closest pairs in 2D
Definition at line 83 of file ClosestPair2DBase.hh.
virtual fastjet::ClosestPair2DBase::~ClosestPair2DBase | ( | ) | [inline, virtual] |
Definition at line 122 of file ClosestPair2DBase.hh.
{};
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 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 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::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.
{ remove(ID1); remove(ID2); unsigned new_ID = insert(position); return(new_ID); };
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.
{ for(unsigned i = 0; i < IDs_to_remove.size(); i++) { remove(IDs_to_remove[i]);} new_IDs.resize(0); for(unsigned i = 0; i < new_positions.size(); i++) { new_IDs.push_back(insert(new_positions[i]));} }
virtual unsigned int fastjet::ClosestPair2DBase::size | ( | ) | [pure virtual] |
Implemented in fastjet::ClosestPair2D.