DualtreeVKde< TKernel > Class Template Reference

A computation class for dual-tree based variable-bandwidth kernel density estimation. More...

Collaboration diagram for DualtreeVKde< TKernel >:
[legend]

List of all members.

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

Detailed Description

template<typename TKernel>
class DualtreeVKde< TKernel >

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.


Constructor & Destructor Documentation

template<typename TKernel>
DualtreeVKde< TKernel >::DualtreeVKde (  )  [inline]

The default constructor.

Definition at line 283 of file dualtree_vkde.h.

template<typename TKernel>
DualtreeVKde< TKernel >::~DualtreeVKde (  )  [inline]

The default destructor which deletes the trees.

Definition at line 289 of file dualtree_vkde.h.


Member Function Documentation

template<typename TKernel>
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().


The documentation for this class was generated from the following file:
Generated on Mon Jan 24 12:04:40 2011 for FASTlib by  doxygen 1.6.3