/** 
* @file VCOneVsAll.h
* @brief one-vs.-all svm voting
* @author Erik Rodner
* @date 10/25/2007

*/
#ifndef VCOneVsAllINCLUDE
#define VCOneVsAllINCLUDE

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

#include "vislearning/classifier/classifierbase/VecClassifier.h"
#include "core/basics/triplet.h"


namespace OBJREC {

/** one-vs.-all svm voting */
class VCOneVsAll : public VecClassifier
{
    protected:
		std::vector< std::pair<int, VecClassifier *> > classifiers;
		const VecClassifier *prototype;

    public:
  
		/** simple constructor */
		VCOneVsAll( const NICE::Config *conf, const VecClassifier *prototype );
		
		VCOneVsAll( const VCOneVsAll &vcova );
		  
		/** simple destructor */
		virtual ~VCOneVsAll();
		 
		/** classify using simple vector */
		ClassificationResult classify ( const NICE::Vector & x ) const;

		/** classify using a simple vector */
		void teach ( const LabeledSetVector & teachSet );
		
		void finishTeaching();

		void clear () {};
		void store ( std::ostream & os, int format = 0 ) const {};
		void restore ( std::istream & is, int format = 0 ) {};
		
		virtual VecClassifier *clone(void) const;
};

} // namespace

#endif
