/**
* @file VecClassifier.h
* @brief Simple classification interface
* @author Erik Rodner
* @date 07.09.2007

*/
#ifndef VecClassifierINCLUDE
#define VecClassifierINCLUDE

#include "core/basics/Persistent.h"
#include "core/basics/Config.h"

#include "vislearning/cbaselib/LabeledSet.h"
#include "vislearning/cbaselib/ClassificationResult.h"

#define ROADWORKS fthrow(NICE::Exception, "clone(): not yet implemented!");
#define ROADWORKSADD fthrow(NICE::Exception, "teach (int classno, const NICE::Vector & x ): not yet implemented!");

namespace OBJREC
{

/** Simple classification interface */
class VecClassifier : public NICE::Persistent
{
  protected:
    int maxClassNo;

  public:

    VecClassifier()
    {
      maxClassNo = 0;
    };

    /** simple constructor */
    VecClassifier ( const NICE::Config *conf );

    /** simple destructor */
    virtual ~VecClassifier();

    virtual void setMaxClassNo ( int maxClassNo );

    virtual int getMaxClassNo () const;

    /** classify using simple vector */
    virtual ClassificationResult classify ( const NICE::Vector & x ) const = 0;

    /** teach classifier with a labeled set of feature vectors */
    virtual void teach ( const LabeledSetVector & teachSet ) = 0;

    /** calculate classifier stuff as the last training step */
    virtual void finishTeaching() = 0;

    /** clone this object */
    virtual VecClassifier *clone ( void ) const
    {
      ROADWORKS;
    };
    
    virtual void teach (int classno, const NICE::Vector & x )
    {
      ROADWORKSADD;
    };

};

#undef ROADWORKS


} // namespace

#endif
