Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
do apply() renames in typemaps + misc fixes in labels
- Loading branch information
Soeren Sonnenburg
committed
May 21, 2012
1 parent
8f5bf6e
commit 39bb66e
Showing
9 changed files
with
74 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/*%warnfilter(302) apply; | ||
%warnfilter(302) apply_generic;*/ | ||
%rename(apply_generic) apply(CFeatures*); | ||
|
||
namespace shogun { | ||
%extend CMulticlassMachine | ||
{ | ||
CMulticlassLabels* apply(CFeatures* data=NULL) | ||
{ | ||
return CMulticlassLabels::obtain_from_generic($self->apply_multiclass(data)); | ||
} | ||
} | ||
|
||
%extend CKernelMulticlassMachine | ||
{ | ||
CMulticlassLabels* apply(CFeatures* data=NULL) | ||
{ | ||
return CMulticlassLabels::obtain_from_generic($self->apply_multiclass(data)); | ||
} | ||
} | ||
|
||
/*%extend COnlineLinearMachine | ||
{ | ||
CRealLabels* apply(CFeatures* data=NULL) | ||
{ | ||
return CRealLabels::obtain_from_generic($self->apply_binary(data)); | ||
} | ||
}*/ | ||
|
||
%extend CLinearMachine | ||
{ | ||
CRealLabels* apply(CFeatures* data=NULL) | ||
{ | ||
return CRealLabels::obtain_from_generic($self->apply_regression(data)); | ||
} | ||
} | ||
|
||
%extend CKernelMachine | ||
{ | ||
CRealLabels* apply(CFeatures* data=NULL) | ||
{ | ||
return CRealLabels::obtain_from_generic($self->apply_regression(data)); | ||
} | ||
} | ||
|
||
%extend CDistanceMachine | ||
{ | ||
CMulticlassLabels* apply(CFeatures* data=NULL) | ||
{ | ||
return CMulticlassLabels::obtain_from_generic($self->apply_multiclass(data)); | ||
} | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters