/** 
* @file Kernel.h
* @brief Interface for Mercer Kernels
* @author Erik Rodner
* @date 10/24/2007

*/
#ifndef KERNELINCLUDE
#define KERNELINCLUDE

#include "core/vector/VVector.h"
#include "KernelData.h"
  

namespace OBJREC {

/** Interface for Mercer Kernels */
class Kernel
{
    protected:
	bool symmetric;

    public:
  
	/** simple constructor */
	Kernel( bool symmetric );
      
	/** simple destructor */
	virtual ~Kernel();

	virtual double K (const NICE::Vector & x, const NICE::Vector & y) const = 0;

	virtual void calcGramMatrix ( const NICE::VVector & vecSet, NICE::Matrix & G ) const;
	virtual void calcKernelData ( const NICE::VVector & vecSet, KernelData *kernelData ) const;

	void calcKernelVector ( const NICE::VVector & vecSet, const NICE::Vector & y, NICE::Vector & kstar ) const;

	virtual Kernel *clone(void) const;
     
};


} // namespace

#endif
