/** 
* @file VCFeaturePool.h
* @brief standard interface to ICE classifiers
* @author Erik Rodner
* @date 07.09.2007

*/
#ifndef VCFeaturePoolINCLUDE
#define VCFeaturePoolINCLUDE

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

#include <string>

#include "vislearning/classifier/classifierbase/VecClassifier.h"
#include "vislearning/classifier/classifierbase/FeaturePoolClassifier.h"
#include "vislearning/cbaselib/CachedExample.h"


namespace OBJREC {

/** standard interface to ICE classifiers */
class VCFeaturePool : public VecClassifier
{
    protected:
	FeaturePoolClassifier *fpc;
	Examples examples;
	const NICE::Config *conf;

	std::string featurePoolCache;
	bool readFeaturePool;

	int dimension;

    public:
  
	/** simple constructor */
	VCFeaturePool( const NICE::Config *conf,
		       FeaturePoolClassifier *fpc );

	/** simple destructor */
	virtual ~VCFeaturePool();
     
     
	/** classify using simple vector */
	ClassificationResult classify ( const NICE::Vector & x ) const;

	/** training routine */
	void teach ( const LabeledSetVector & teachSet );

	virtual void setMaxClassNo ( int maxClassNo );

	void clear ();

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

	void restore ( std::istream & is, int format = 0 );

	void finishTeaching();

};

} // namespace

#endif
