A computation class for dual-tree based variable-bandwidth kernel density estimation. More...
Public Types | |
typedef GeneralBinarySpaceTree < DBallBound< LMetric < 2 >, Vector >, Matrix, VKdeStat< TKernel > > | Tree |
Public Member Functions | |
void | Compute (Vector *results) |
DualtreeVKde () | |
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 () |
~DualtreeVKde () | |
The default destructor which deletes the trees. | |
Friends | |
class | DualtreeKdeCommon |
A computation class for dual-tree based variable-bandwidth 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:
DualtreeVKde 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 124 of file dualtree_vkde.h.
DualtreeVKde< TKernel >::DualtreeVKde | ( | ) | [inline] |
The default constructor.
Definition at line 283 of file dualtree_vkde.h.
DualtreeVKde< TKernel >::~DualtreeVKde | ( | ) | [inline] |
The default destructor which deletes the trees.
Definition at line 289 of file dualtree_vkde.h.
void DualtreeVKde< TKernel >::get_density_estimates | ( | Vector * | results | ) | [inline] |
Get the density estimate.
Definition at line 305 of file dualtree_vkde.h.
References GenVector< T >::Init(), and GenVector< T >::length().