PDFMultinomial.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. #include "core/image/ImageT.h"
  10. #include "core/vector/VectorT.h"
  11. #include "core/vector/MatrixT.h"
  12. #include "PDF.h"
  13. namespace OBJREC {
  14. /** Multinomial distribution */
  15. class PDFMultinomial : public PDF
  16. {
  17. protected:
  18. /** dimension of this random variable */
  19. int dimension;
  20. /** parameter of the multinomial containing
  21. all probabilities for each component */
  22. // refactor-nice.pl: check this substitution
  23. // old: Vector theta;
  24. NICE::Vector theta;
  25. /** number of trails */
  26. int N;
  27. public:
  28. /** simple constructor */
  29. PDFMultinomial( int dimension );
  30. // refactor-nice.pl: check this substitution
  31. // old: PDFMultinomial( const Vector & theta, int N );
  32. PDFMultinomial( const NICE::Vector & theta, int N );
  33. /** simple destructor */
  34. virtual ~PDFMultinomial();
  35. // refactor-nice.pl: check this substitution
  36. // old: double getNLogDensity ( const Vector & x ) const;
  37. double getNLogDensity ( const NICE::Vector & x ) const;
  38. // refactor-nice.pl: check this substitution
  39. // old: double getProb ( const Vector & x ) const;
  40. double getProb ( const NICE::Vector & x ) const;
  41. int getDimension () const;
  42. void sample ( NICE::VVector & samples, int count ) const;
  43. int sample () const;
  44. double getDiscreteProbability ( int index ) const;
  45. };
  46. } // namespace
  47. #endif