/** 
* @file VCSimpleGaussian.h
* @brief Simple Gaussian Classifier
* @author Erik Rodner
* @date 12/05/2007

*/

#ifdef NICE_USELIB_ICE
#ifndef VCSIMPLEGAUSSIANINCLUDE
#define VCSIMPLEGAUSSIANINCLUDE

#include "vislearning/classifier/classifierbase/VecClassifier.h"
#include "vislearning/math/pdf/PDF.h"

#include <image_nonvis.h>

namespace OBJREC {

/** Simple Gaussian Classifier */
class VCSimpleGaussian : public VecClassifier
{
    public:
	std::map<int, ice::Statistics *> statistics;

	std::map<int, PDF *> pdfs;

	double calcNLogDensity ( int classno, const NICE::Vector & x ) const;
    public:
  
	/** simple constructor */
	VCSimpleGaussian( const NICE::Config *conf);
      
	/** simple destructor */
	virtual ~VCSimpleGaussian();
 
	/** classify using simple vector */
	ClassificationResult classify ( const NICE::Vector & x ) const;

	/** classify using a simple vector */
	void teach ( const LabeledSetVector & teachSet );
	
	void teach ( int classno, const NICE::Vector & x );
	
	void finishTeaching();

	void clear ();

	void store ( std::ostream & os, int format = 0 ) const;

	void restore ( std::istream & is, int format = 0 );
	
	void getVotings ( const NICE::Vector & x, std::map<int, double> & votings ) const;

        PDF *getPDF(int classno) const;
        
};


} // namespace

#endif

#endif
