A computation class for dual-tree based kernel density estimation. More...
Public Types | |
typedef GeneralBinarySpaceTree < DBallBound< LMetric < 2 >, Vector >, Matrix, KdeStat< TKernelAux > > | Tree |
Public Member Functions | |
void | Compute (Vector *results) |
DualtreeKde () | |
The default constructor. | |
void | get_density_estimates (Vector *results) |
Get the density estimate. | |
void | Init (const Matrix &queries, const Matrix &references, const Matrix &rset_weights, bool queries_equal_references, struct datanode *module_in) |
void | PrintDebug () |
~DualtreeKde () | |
The default destructor which deletes the trees. | |
Friends | |
class | DualtreeKdeCommon |
A computation class for dual-tree based kernel density estimation.
This class builds trees for input query and reference sets on Init. The KDE computation is then performed by calling Compute.
This class is only intended to compute once per instantiation.
Example use:
DualtreeKde fast_kde; struct datanode* kde_module; Vector results; kde_module = fx_submodule(NULL, "kde", "kde_module"); fast_kde.Init(queries, references, queries_equal_references, kde_module); // important to make sure that you don't call Init on results! fast_kde.Compute(&results);
Definition at line 190 of file dualtree_kde.h.
DualtreeKde< TKernelAux >::DualtreeKde | ( | ) | [inline] |
The default constructor.
Definition at line 363 of file dualtree_kde.h.
DualtreeKde< TKernelAux >::~DualtreeKde | ( | ) | [inline] |
The default destructor which deletes the trees.
Definition at line 369 of file dualtree_kde.h.
void DualtreeKde< TKernelAux >::get_density_estimates | ( | Vector * | results | ) | [inline] |
Get the density estimate.
Definition at line 385 of file dualtree_kde.h.
References GenVector< T >::Init(), and GenVector< T >::length().