/** 
* @file PDFParzen.h
* @brief Parzen density
* @author Erik Rodner
* @date 01/29/2008

*/
#ifndef PDFParzenINCLUDE
#define PDFParzenINCLUDE

#include "core/image/ImageT.h"
#include "core/vector/VectorT.h"
#include "core/vector/MatrixT.h"

#include <map>
#include "PDF.h"
#include "vislearning/baselib/Gnuplot.h"


namespace OBJREC {

/** Parzen Density */
class PDFParzen : public PDF
{

    protected:
	// refactor-nice.pl: check this substitution
	// old: Vector samples;
	NICE::Vector samples;
	double kernel_h;

	double kernel ( double val ) const;

    public:
  
	/** simple constructor */
	// refactor-nice.pl: check this substitution
	// old: PDFParzen ( const Vector & samples, double _kernel_h );
	PDFParzen ( const NICE::Vector & samples, double _kernel_h );

	/** simple destructor */
	virtual ~PDFParzen();
 
	// refactor-nice.pl: check this substitution
	// old: double getNLogDensity ( const Vector & x ) const;
	double getNLogDensity ( const NICE::Vector & x ) const;
	int getDimension () const;

	void vis ( Gnuplot & gnuplot ) const;

    
};


} // namespace

#endif
