/** 
* @file ParameterizedKernel.h
* @brief Interface for parameterized kernel functions
* @author Erik Rodner
* @date 12/04/2009

*/
#ifndef PARAMETERIZEDKERNELINCLUDE
#define PARAMETERIZEDKERNELINCLUDE

#include "Kernel.h"
#include "KernelData.h"

namespace OBJREC {
  
/** Interface for parameterized kernel functions */
class ParameterizedKernel : public Kernel
{

    protected:

    public:
  
	/** simple constructor */
	ParameterizedKernel();
      
	/** simple destructor */
	virtual ~ParameterizedKernel();

	/** 
	 * update kernelMatrix (and maybe other caching stuff) in kernelData using new parameters
	 * of the kernel function
	 */
	virtual void updateKernelData ( KernelData *kernelData ) const = 0;

	/** get the size of the parameter vector */
	virtual size_t getParameterSize () const = 0;

	/** compute the jacobi matrix of the parameter with index \c parameter by using \c parameters as an argument and the matrix \c kernelMatrix
	 * as the pre-computed kernel values */
	virtual void getKernelJacobi ( size_t parameter, const NICE::Vector & parameters, const KernelData *kernelData, NICE::Matrix & jacobiMatrix ) const = 0;

	virtual void setParameters( const NICE::Vector & newParameters ) = 0;
	
	virtual void getParameters( NICE::Vector & newParameters ) const = 0;
     
};

}

#endif