Skip to content

Commit

Permalink
use SG_ADD for registering parameters without downcast
Browse files Browse the repository at this point in the history
  • Loading branch information
karlnapf committed Feb 28, 2018
1 parent 3ea8d36 commit 28112f1
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions src/shogun/kernel/Kernel.cpp
Expand Up @@ -926,16 +926,12 @@ void CKernel::register_params() {
SG_ADD(&cache_size, "cache_size",
"Cache size in MB.", MS_NOT_AVAILABLE);

// SG_ADD((CSGObject**) &lhs, "lhs",
// "Feature vectors to occur on left hand side.", MS_NOT_AVAILABLE);
m_parameters->add((CSGObject**)&lhs, "lhs", "Feature vectors to occur on left hand side.");
watch_param("lhs", &lhs, AnyParameterProperties("Feature vectors to occur on left hand side."));

// SG_ADD((CSGObject**) &rhs, "rhs",
// "Feature vectors to occur on right hand side.", MS_NOT_AVAILABLE);
m_parameters->add((CSGObject**)&rhs, "rhs", "Feature vectors to occur on right hand side.");
watch_param("rhs", &rhs, AnyParameterProperties("Feature vectors to occur on right hand side."));

SG_ADD(
&lhs, "lhs", "Feature vectors to occur on left hand side.",
MS_NOT_AVAILABLE);
SG_ADD(
&rhs, "rhs", "Feature vectors to occur on right hand side.",
MS_NOT_AVAILABLE);
SG_ADD(&lhs_equals_rhs, "lhs_equals_rhs",
"If features on lhs are the same as on rhs.", MS_NOT_AVAILABLE);
SG_ADD(&num_lhs, "num_lhs", "Number of feature vectors on left hand side.",
Expand Down

0 comments on commit 28112f1

Please sign in to comment.