Loading...
Searching...
No Matches
fastjet::ClosestPair2D Class Reference

More...

`#include <fastjet/internal/ClosestPair2D.hh>`

Inheritance diagram for fastjet::ClosestPair2D:
[legend]
Collaboration diagram for fastjet::ClosestPair2D:
[legend]

## Classes

class | Point

## Public Member Functions

| ClosestPair2D (const std::vector< Coord2D > &positions, const Coord2D &left_corner, const Coord2D &right_corner)
| constructor from a vector of 2D positions – number of objects after insertion and deletion must never exceed positions.size(); objects are given IDs that correspond to their index in the vector of positions
| ClosestPair2D (const std::vector< Coord2D > &positions, const Coord2D &left_corner, const Coord2D &right_corner, const unsigned int max_size)
| constructor which allows structure to grow beyond positions.size(), up to max_size
void | closest_pair (unsigned int &ID1, unsigned int &ID2, double &distance2) const
| provides the IDs of the closest pair as well as the distance between them
void | remove (unsigned int ID)
| removes the entry labelled by ID from the object;
unsigned int | insert (const Coord2D &)
| 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)
| removes ID1 and ID2 and inserts position, returning the ID corresponding to 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)
| replaces IDs_to_remove with points at the new_positions indicating the IDs allocated to the new points in new_IDs
void | print_tree_depths (std::ostream &outdev) const
unsigned int | size ()

## Detailed Description

Definition at line 51 of file ClosestPair2D.hh.

## Constructor & Destructor Documentation

## ClosestPair2D() [1/2]

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

inline

constructor from a vector of 2D positions – number of objects after insertion and deletion must never exceed positions.size(); objects are given IDs that correspond to their index in the vector of positions

Definition at line 57 of file ClosestPair2D.hh.

## ClosestPair2D() [2/2]

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

inline

constructor which allows structure to grow beyond positions.size(), up to max_size

Definition at line 64 of file ClosestPair2D.hh.

## Member Function Documentation

## closest_pair()

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

virtual

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

Implements fastjet::ClosestPair2DBase.

Definition at line 181 of file ClosestPair2D.cc.

## remove()

void fastjet::ClosestPair2D::remove | ( | unsigned int | ID | ) |

virtual

removes the entry labelled by ID from the object;

Implements fastjet::ClosestPair2DBase.

Definition at line 217 of file ClosestPair2D.cc.

## insert()

unsigned int fastjet::ClosestPair2D::insert | ( | const Coord2D & | new_coord | ) |

virtual

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

Implements fastjet::ClosestPair2DBase.

Definition at line 349 of file ClosestPair2D.cc.

## replace()

unsigned int fastjet::ClosestPair2D::replace | ( | unsigned int | ID1,
|  | unsigned int | ID2,
|  | const Coord2D & | position )

virtual

removes ID1 and ID2 and inserts position, returning the ID corresponding to position...

Reimplemented from fastjet::ClosestPair2DBase.

Definition at line 371 of file ClosestPair2D.cc.

## replace_many()

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

virtual

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

Reimplemented from fastjet::ClosestPair2DBase.

Definition at line 403 of file ClosestPair2D.cc.

## print_tree_depths()

void fastjet::ClosestPair2D::print_tree_depths | ( | std::ostream & | outdev | ) | const

inline

Definition at line 94 of file ClosestPair2D.hh.

## size()

unsigned int fastjet::ClosestPair2D::size | ( |  | ) |

inline virtual

Implements fastjet::ClosestPair2DBase.

Definition at line 235 of file ClosestPair2D.hh.

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

- include/fastjet/internal/ClosestPair2D.hh
- src/ClosestPair2D.cc