Skip to content

Commit

Permalink
create *public* kernel_function method to be overidden in directorkernel
Browse files Browse the repository at this point in the history
  • Loading branch information
Soeren Sonnenburg committed May 26, 2012
1 parent 216b658 commit 817fb76
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/shogun/kernel/DirectorKernel.h
Expand Up @@ -61,6 +61,12 @@ IGNORE_IN_CLASSLIST class CDirectorKernel: public CKernel
{
}

virtual float64_t kernel_function(int32_t idx_a, int32_t idx_b)
{
SG_ERROR("Kernel function of Director Kernel needs to be overridden.\n");
return 0;
}

/** return what type of kernel we are
*
* @return kernel type DIRECTOR
Expand Down Expand Up @@ -241,8 +247,7 @@ IGNORE_IN_CLASSLIST class CDirectorKernel: public CKernel
*/
virtual float64_t compute(int32_t idx_a, int32_t idx_b)
{
SG_ERROR("Compute method of Director Kernel needs to be overridden.\n");
return 0;
return kernel_function(idx_a, idx_b);
}

virtual void register_params()
Expand Down

0 comments on commit 817fb76

Please sign in to comment.