FFTKde Class Reference

A computation class for FFT based kernel density estimation. More...

Collaboration diagram for FFTKde:
[legend]

List of all members.

Public Member Functions

void Compute ()
 Compute density estimates using FFT after initialization.
 FFTKde ()
 Constructor - does not do anything.
void get_density_estimates (Vector *results)
 Get the density estimates.
void Init (Matrix &qset, Matrix &rset, struct datanode *module_in)
 Initialize the FFT KDE object with the query and the reference datasets with the parameter lists.
void PrintDebug ()
 Output KDE results to a stream.
 ~FFTKde ()
 Destructor - does not do anything.

Detailed Description

A computation class for FFT based kernel density estimation.

This class is only inteded to compute once per instantiation.

Example use:

    FFTKde fft_kde;
    struct datanode* fft_kde_module;
    Vector results;

    fft_kde_module = fx_submodule(NULL, "kde", "fft_kde_module");
    fft_kde.Init(queries, references, fft_kde_module);
    fft_kde.Compute();

    // important to make sure that you don't call Init on results!
    fft_kde.get_density_estimates(&results);

Definition at line 77 of file fft_kde.h.


Constructor & Destructor Documentation

FFTKde::FFTKde (  )  [inline]

Constructor - does not do anything.

Definition at line 733 of file fft_kde.h.

FFTKde::~FFTKde (  )  [inline]

Destructor - does not do anything.

Definition at line 736 of file fft_kde.h.


Member Function Documentation

void FFTKde::Compute (  )  [inline]

Compute density estimates using FFT after initialization.

Definition at line 802 of file fft_kde.h.

References ArrayList< TElem >::begin(), fx_timer_start(), fx_timer_stop(), GenVector< T >::ptr(), and GenVector< T >::SetZero().

Referenced by main().

void FFTKde::get_density_estimates ( Vector results  )  [inline]

Get the density estimates.

Parameters:
results An uninitialized vector which will be initialized with the computed density estimates.

Definition at line 745 of file fft_kde.h.

References GenVector< T >::Init(), and GenVector< T >::length().

Referenced by main().

void FFTKde::Init ( Matrix &  qset,
Matrix &  rset,
struct datanode module_in 
) [inline]

Initialize the FFT KDE object with the query and the reference datasets with the parameter lists.

Parameters:
qset The column-oriented query dataset.
rset The column-oriented reference dataset.
module_in The module containing the parameters for execution.

Definition at line 760 of file fft_kde.h.

References fx_param_double_req(), fx_param_int(), fx_timer_start(), fx_timer_stop(), ArrayList< TElem >::Init(), and GenVector< T >::Init().

Referenced by main().

void FFTKde::PrintDebug (  )  [inline]

Output KDE results to a stream.

If the user provided "--fft_kde_output=" argument, then the output will be directed to a file whose name is provided after the equality sign. Otherwise, it will be provided to the screen.

Definition at line 863 of file fft_kde.h.

References fx_param_str().

Referenced by main().


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