FastJet 3.0.2
Public Member Functions
fastjet::NNH< BJ, I > Class Template Reference

Help solve closest pair problems with generic interparticle and beam distance. More...

#include <fastjet/NNH.hh>

Inheritance diagram for fastjet::NNH< BJ, I >:
Inheritance graph
[legend]
Collaboration diagram for fastjet::NNH< BJ, I >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 NNH (const std::vector< PseudoJet > &jets)
 constructor with an initial set of jets (which will be assigned indices 0 ...
 NNH (const std::vector< PseudoJet > &jets, I *info)
void start (const std::vector< PseudoJet > &jets)
double dij_min (int &iA, int &iB)
 return the dij_min and indices iA, iB, for the corresponding jets.
void remove_jet (int iA)
 remove the jet pointed to by index iA
void merge_jets (int iA, int iB, const PseudoJet &jet, int jet_index)
 merge the jets pointed to by indices A and B and replace them with jet, assigning it an index jet_index.
 ~NNH ()
 a destructor

Detailed Description

template<class BJ, class I = _NoInfo>
class fastjet::NNH< BJ, I >

Help solve closest pair problems with generic interparticle and beam distance.

Class to help solve closest pair problems with generic interparticle distances and a beam distance, using Anderberg's Nearest Neighbour Heuristic.

It is templated with a BJ (brief jet) class --- BJ should basically cache the minimal amount of information that is needed to efficiently calculate interparticle distances and particle-beam distances.

This class can be used with or without an extra "Information" template, i.e. NNB<BJ> or NNH<BJ,I>

For the NNH<BJ> version of the class to function, BJ must provide three member functions

For the NNH<BJ,I> version to function, the BJ::init(...) member must accept an extra argument

where info might be a pointer to a class that contains, e.g., information about R, or other parameters of the jet algorithm

For an example of how the NNH<BJ> class is used, see the Jade (and EECambridge) plugins

NB: the NNH algorithm is expected N^2, but has a worst case of N^3. Many QCD problems tend to place one closer to the N^3 end of the spectrum than one would like. There is scope for further progress (cf Eppstein, Cardinal & Eppstein), nevertheless the current class is already significantly faster than standard N^3 implementations.

Implementation note: this class derives from NNHInfo, which deals with storing any global information that is needed during the clustering

Definition at line 111 of file NNH.hh.


Constructor & Destructor Documentation

template<class BJ, class I = _NoInfo>
fastjet::NNH< BJ, I >::NNH ( const std::vector< PseudoJet > &  jets) [inline]

constructor with an initial set of jets (which will be assigned indices 0 ...

jets.size()-1

Definition at line 116 of file NNH.hh.


Member Function Documentation

template<class BJ , class I >
double fastjet::NNH< BJ, I >::dij_min ( int &  iA,
int &  iB 
)

return the dij_min and indices iA, iB, for the corresponding jets.

If iB < 0 then iA recombines with the beam

Definition at line 222 of file NNH.hh.

template<class BJ , class I >
void fastjet::NNH< BJ, I >::merge_jets ( int  iA,
int  iB,
const PseudoJet jet,
int  jet_index 
)

merge the jets pointed to by indices A and B and replace them with jet, assigning it an index jet_index.

Definition at line 265 of file NNH.hh.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends