Skip to content

Commit

Permalink
Splitted methods in apply macro in Machine.i.
Browse files Browse the repository at this point in the history
  • Loading branch information
lisitsyn authored and Soeren Sonnenburg committed May 22, 2012
1 parent 91829c9 commit 5b12cea
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions src/interfaces/modular/Machine.i
Expand Up @@ -22,30 +22,42 @@
%define APPLY_MULTICLASS(CLASS)
%extend CLASS
{
CMulticlassLabels* apply(CFeatures* data=NULL)
CMulticlassLabels* apply(CFeatures* data)
{
return $self->apply_multiclass(data);
}
CMulticlassLabels* apply()
{
return $self->apply_multiclass();
}
}
%enddef

%define APPLY_BINARY(CLASS)
%extend CLASS
{
CBinaryLabels* apply(CFeatures* data=NULL)
CBinaryLabels* apply(CFeatures* data)
{
return $self->apply_binary(data);
}
CBinaryLabels* apply()
{
return $self->apply_binary();
}
}
%enddef

%define APPLY_REGRESSION(CLASS)
%extend CLASS
{
CRegressionLabels* apply(CFeatures* data=NULL)
CRegressionLabels* apply(CFeatures* data)
{
return $self->apply_regression(data);
}
CRegressionLabels* apply()
{
return $self->apply_regression();
}
}
%enddef

Expand Down

0 comments on commit 5b12cea

Please sign in to comment.