PDFMultinomial.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /**
  2. * @file PDFMultinomial.h
  3. * @brief Multinomial distribution
  4. * @author Erik Rodner
  5. * @date 01/29/2008
  6. */
  7. #ifndef PDFMultinomialINCLUDE
  8. #define PDFMultinomialINCLUDE
  9. #ifdef NOVISUAL
  10. #include <vislearning/nice_nonvis.h>
  11. #else
  12. #include <vislearning/nice.h>
  13. #endif
  14. #include "PDF.h"
  15. namespace OBJREC {
  16. /** Multinomial distribution */
  17. class PDFMultinomial : public PDF
  18. {
  19. protected:
  20. /** dimension of this random variable */
  21. int dimension;
  22. /** parameter of the multinomial containing
  23. all probabilities for each component */
  24. // refactor-nice.pl: check this substitution
  25. // old: Vector theta;
  26. NICE::Vector theta;
  27. /** number of trails */
  28. int N;
  29. public:
  30. /** simple constructor */
  31. PDFMultinomial( int dimension );
  32. // refactor-nice.pl: check this substitution
  33. // old: PDFMultinomial( const Vector & theta, int N );
  34. PDFMultinomial( const NICE::Vector & theta, int N );
  35. /** simple destructor */
  36. virtual ~PDFMultinomial();
  37. // refactor-nice.pl: check this substitution
  38. // old: double getNLogDensity ( const Vector & x ) const;
  39. double getNLogDensity ( const NICE::Vector & x ) const;
  40. // refactor-nice.pl: check this substitution
  41. // old: double getProb ( const Vector & x ) const;
  42. double getProb ( const NICE::Vector & x ) const;
  43. int getDimension () const;
  44. void sample ( NICE::VVector & samples, int count ) const;
  45. int sample () const;
  46. double getDiscreteProbability ( int index ) const;
  47. };
  48. } // namespace
  49. #endif