/** 
* @file KernelLinCombNormalized.h
* @brief Interface for normalized linear kernel combination 
* @author Erik Rodner
* @date 10/24/2007

*/
#ifndef KERNELLINEARCOMBINATIONNORMALIZEDINCLUDE
#define KERNELLINEARCOMBINATIONNORMALIZEDINCLUDE

#include "Kernel.h"
#include "ParameterizedKernel.h"

namespace OBJREC {

/** Interface for normalized linear kernel combination */
class KernelLinCombNormalized : public ParameterizedKernel
{

    protected:

		NICE::Vector alpha;
		bool exponential;

    public:
  
		/** simple constructor */
		KernelLinCombNormalized( uint num, bool exponential = false );

		/** copy constructor */
		KernelLinCombNormalized ( const KernelLinCombNormalized & src );
		  
		/** simple destructor */
		virtual ~KernelLinCombNormalized();

		/** clone this object */
		KernelLinCombNormalized *clone(void) const;
		 
		/** compute the kernel value */
		double K (const NICE::Vector & x, const NICE::Vector & y) const;

		void updateKernelData ( KernelData *kernelData ) const;

		size_t getParameterSize () const { return alpha.size(); }; 

		void getKernelJacobi ( size_t parameter, const NICE::Vector & parameters, const KernelData *kernelData, NICE::Matrix & jacobiMatrix ) const;

		void setParameters( const NICE::Vector & newParameters );
		
		void getParameters( NICE::Vector & newParameters ) const;

};


} // namespace

#endif
