Garfield++ 4.0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
|
#include <KDTree.hh>
Public Member Functions | |
KDTree ()=delete | |
KDTree (KDTreeArray &data_in) | |
Constructor. | |
~KDTree () | |
Destructor. | |
void | n_nearest (const std::vector< double > &qv, const unsigned int nn, std::vector< KDTreeResult > &result) const |
void | n_nearest_around_point (const unsigned int idx, const unsigned int ndecorrel, const unsigned int nn, std::vector< KDTreeResult > &result) const |
void | r_nearest (const std::vector< double > &qv, const double r2, std::vector< KDTreeResult > &result) const |
void | r_nearest_around_point (const unsigned int idx, const unsigned int ndecorrel, const double r2, std::vector< KDTreeResult > &result) const |
Public Attributes | |
const KDTreeArray & | m_data |
size_t | m_dim |
bool | sort_results = false |
Friends | |
class | KDTreeNode |
Main k-d tree class. Fast search of points in k-dimensional Euclidean space.
|
delete |
Garfield::KDTree::KDTree | ( | KDTreeArray & | data_in | ) |
Constructor.
Garfield::KDTree::~KDTree | ( | ) |
void Garfield::KDTree::n_nearest | ( | const std::vector< double > & | qv, |
const unsigned int | nn, | ||
std::vector< KDTreeResult > & | result | ||
) | const |
Search for nn nearest neighbours around a point.
qv | input point |
nn | number of nearest neighbours |
result | indices and distances of the nearest neighbours |
Definition at line 174 of file KDTree.cc.
Referenced by Garfield::ComponentComsol::Initialise(), Garfield::ComponentComsol::SetDelayedWeightingPotential(), and Garfield::ComponentComsol::SetWeightingField().
void Garfield::KDTree::n_nearest_around_point | ( | const unsigned int | idx, |
const unsigned int | ndecorrel, | ||
const unsigned int | nn, | ||
std::vector< KDTreeResult > & | result | ||
) | const |
Search for nn nearest neighbours around a node of the input data, excluding neighbors within a decorrelation interval.
idx | index of the input point |
ndecorrel | decorrelation interval |
nn | number of nearest neighbours |
result | indices and distances of the nearest neighbours |
Definition at line 189 of file KDTree.cc.
void Garfield::KDTree::r_nearest | ( | const std::vector< double > & | qv, |
const double | r2, | ||
std::vector< KDTreeResult > & | result | ||
) | const |
Search for all neighbors in a ball of size r2
qv | input point |
r2 | ball size (square Euclidean distance) |
result | indices and distances of the nearest neighbours |
Definition at line 205 of file KDTree.cc.
void Garfield::KDTree::r_nearest_around_point | ( | const unsigned int | idx, |
const unsigned int | ndecorrel, | ||
const double | r2, | ||
std::vector< KDTreeResult > & | result | ||
) | const |
|
friend |
const KDTreeArray& Garfield::KDTree::m_data |
Definition at line 37 of file KDTree.hh.
Referenced by n_nearest_around_point(), and r_nearest_around_point().
bool Garfield::KDTree::sort_results = false |
Definition at line 40 of file KDTree.hh.
Referenced by n_nearest(), n_nearest_around_point(), r_nearest(), and r_nearest_around_point().