15 using namespace shogun;
48 bool result = CDotKernel::init(l,r);
71 float64_t result = compute_recursive1(avec, bvec, alen);
90 float64_t result = compute_recursive2(avec, bvec, alen);
163 for (int32_t j=0; j < len+1; j++)
166 for (int32_t k=1; k < d+1; k++)
173 for (int32_t j=k; j < len+1; j++)
174 DP[k*offs+j]=
DP[k*offs+j-1]+avec[j-1]*bvec[j-1]*
DP[(k-1)*offs+j-1];
189 for (int32_t i=0; i < len; i++)
192 for (int32_t k=1; k < d+1; k++)
195 for (int32_t i=0; i < len; i++)
203 for (int32_t k=1; k < d+1; k++)
206 for (int32_t s=1; s < k+1; s++)
212 sum += sign*
KD[k-s]*
KS[s];
virtual void load_serializable_post()
int32_t cardinality
degree parameter of kernel
Class ShogunException defines an exception which is thrown whenever an error inside of shogun occurs...
virtual float64_t compute(int32_t idx_a, int32_t idx_b)
float64_t * DP
array for compute_recursive1
int32_t DP_len
length of DP
float64_t compute_rec2(int32_t idx_a, int32_t idx_b)
virtual void load_serializable_post()
Template class DotKernel is the base class for kernels working on DotFeatures.
void add(bool *param, const char *name, const char *description="")
float64_t * KD
arrays for compute_recursive2
float64_t * vec_pow
vec pow
virtual bool init_normalizer()
CFeatures * rhs
feature vectors to occur on right hand side
CFeatures * lhs
feature vectors to occur on left hand side
The class Features is the base class of all feature objects.
#define SG_MALLOC(type, len)
float64_t compute_rec1(int32_t idx_a, int32_t idx_b)