PDFParzen.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /**
  2. * @file PDFParzen.h
  3. * @brief Parzen density
  4. * @author Erik Rodner
  5. * @date 01/29/2008
  6. */
  7. #ifndef PDFParzenINCLUDE
  8. #define PDFParzenINCLUDE
  9. #ifdef NOVISUAL
  10. #include <vislearning/nice_nonvis.h>
  11. #else
  12. #include <vislearning/nice.h>
  13. #endif
  14. #include <map>
  15. #include "PDF.h"
  16. #include "vislearning/baselib/Gnuplot.h"
  17. namespace OBJREC {
  18. /** Parzen Density */
  19. class PDFParzen : public PDF
  20. {
  21. protected:
  22. // refactor-nice.pl: check this substitution
  23. // old: Vector samples;
  24. NICE::Vector samples;
  25. double kernel_h;
  26. double kernel ( double val ) const;
  27. public:
  28. /** simple constructor */
  29. // refactor-nice.pl: check this substitution
  30. // old: PDFParzen ( const Vector & samples, double _kernel_h );
  31. PDFParzen ( const NICE::Vector & samples, double _kernel_h );
  32. /** simple destructor */
  33. virtual ~PDFParzen();
  34. // refactor-nice.pl: check this substitution
  35. // old: double getNLogDensity ( const Vector & x ) const;
  36. double getNLogDensity ( const NICE::Vector & x ) const;
  37. int getDimension () const;
  38. void vis ( Gnuplot & gnuplot ) const;
  39. };
  40. } // namespace
  41. #endif