/**
* @file KCOneVsAll.h
* @author Erik Rodner
* @date 12/10/2009

*/
#ifndef _NICE_OBJREC_KCONEVSALLINCLUDE
#define _NICE_OBJREC_KCONEVSALLINCLUDE

#include "vislearning/classifier/classifierbase/KernelClassifier.h"

namespace OBJREC
{

#undef ROADWORKS
#define ROADWORKS fthrow(NICE::Exception, "Persistent interface not implemented!");

/** @class KCOneVsAll
 * One vs. All interface for kernel classifiers
 *
 * @author Erik Rodner
 */
class KCOneVsAll : public KernelClassifier
{

  protected:
    std::vector< std::pair<int, KernelClassifier *> > classifiers;
    const KernelClassifier *prototype;
    double noiseSigma;
    bool verbose;

  public:

    /** simple constructor */
    KCOneVsAll ( const NICE::Config *conf, const KernelClassifier *prototype, const std::string & section = "KCOneVsAll" );

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

    /** teach the classifier with a kernel matrix and the corresponding class labels @param y ! */
    void teach ( KernelData *kernelData, const NICE::Vector & y );

    /** classify an example by using its kernel values with the training set,
     be careful with the order in @param kernelVector */
    ClassificationResult classifyKernel ( const NICE::Vector & kernelVector, double kernelSelf ) const;

    void restore ( std::istream&, int )
    {
      ROADWORKS
    };
    void store ( std::ostream&, int ) const
    {
      ROADWORKS
    };
    void clear()
    {
      ROADWORKS
    };

};

#undef ROADWORKS

}

#endif