/** 
* @file KernelExp.cpp
* @brief Interface for the popular exponential mercer kernels
* @author Erik Rodner
* @date 10/24/2007

*/
#include <iostream>

#include <math.h>
#include "vislearning/math/distances/KernelExp.h"

using namespace OBJREC;

using namespace std;
// refactor-nice.pl: check this substitution
// old: using namespace ice;
using namespace NICE;



KernelExp::KernelExp( NICE::VectorDistance<double> *_kInside, double _a ) : Kernel( true )
{
    kInside = _kInside;
    a = _a;
}

KernelExp::~KernelExp()
{
	delete kInside;
}

	
double KernelExp::K (const NICE::Vector & x, const NICE::Vector & y) const
{
    return exp( - kInside->calculate (x,y) / a );
}
