Skip to content

Commit

Permalink
move USE_GPL_SHOGUN guarded files to gpl folder
Browse files Browse the repository at this point in the history
-proper guarding in SWIG interface definitions
  • Loading branch information
karlnapf committed Jul 5, 2017
1 parent 00ec38a commit 846d0dd
Show file tree
Hide file tree
Showing 108 changed files with 44 additions and 14 deletions.
3 changes: 0 additions & 3 deletions src/gpl/shogun/classifier/svm/SVMOcas.h
Expand Up @@ -14,7 +14,6 @@
#define _SVMOCAS_H___

#include <shogun/lib/config.h>
#ifdef USE_GPL_SHOGUN

#include <shogun/lib/common.h>
#include <shogun/machine/LinearMachine.h>
Expand Down Expand Up @@ -238,5 +237,3 @@ class CSVMOcas : public CLinearMachine
};
}
#endif

#endif //USE_GPL_SHOGUN
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions src/interfaces/swig/Classifier.i
Expand Up @@ -67,7 +67,9 @@
%rename(MKLClassification) CMKLClassification;
%rename(MKLOneClass) CMKLOneClass;
%rename(VowpalWabbit) CVowpalWabbit;
#ifdef USE_GPL_SHOGUN
%rename(FeatureBlockLogisticRegression) CFeatureBlockLogisticRegression;
#endif //USE_GPL_SHOGUN
%rename(DirectorLinearMachine) CDirectorLinearMachine;
%rename(DirectorKernelMachine) CDirectorKernelMachine;
%rename(BaggingMachine) CBaggingMachine;
Expand Down Expand Up @@ -130,7 +132,9 @@
%include <shogun/classifier/mkl/MKLOneClass.h>
%include <shogun/classifier/vw/VowpalWabbit.h>
%include <shogun/classifier/svm/NewtonSVM.h>
#ifdef USE_GPL_SHOGUN
%include <shogun/classifier/FeatureBlockLogisticRegression.h>
#endif //USE_GPL_SHOGUN
%include <shogun/machine/DirectorLinearMachine.h>
%include <shogun/machine/DirectorKernelMachine.h>
%include <shogun/machine/BaggingMachine.h>
3 changes: 3 additions & 0 deletions src/interfaces/swig/Classifier_includes.i
@@ -1,3 +1,4 @@

%{
#include <shogun/machine/Machine.h>
#include <shogun/classifier/svm/GNPPSVM.h>
Expand Down Expand Up @@ -39,7 +40,9 @@
#include <shogun/classifier/mkl/MKLOneClass.h>
#include <shogun/classifier/vw/VowpalWabbit.h>
#include <shogun/classifier/svm/NewtonSVM.h>
#ifdef USE_GPL_SHOGUN
#include <shogun/classifier/FeatureBlockLogisticRegression.h>
#endif //USE_GPL_SHOGUN
#include <shogun/machine/DirectorLinearMachine.h>
#include <shogun/machine/DirectorKernelMachine.h>
#include <shogun/machine/BaggingMachine.h>
Expand Down
2 changes: 2 additions & 0 deletions src/interfaces/swig/Latent.i
Expand Up @@ -29,4 +29,6 @@

%include <shogun/machine/LinearLatentMachine.h>

#ifdef USE_GPL_SHOGUN
%include <shogun/latent/LatentSVM.h>
#endif //USE_GPL_SHOGUN
2 changes: 2 additions & 0 deletions src/interfaces/swig/Latent_includes.i
Expand Up @@ -5,6 +5,8 @@

#include <shogun/machine/LinearLatentMachine.h>

#ifdef USE_GPL_SHOGUN
#include <shogun/latent/LatentSVM.h>
#endif USE_GPL_SHOGUN
%}

4 changes: 4 additions & 0 deletions src/interfaces/swig/Mathematics.i
Expand Up @@ -12,7 +12,9 @@
/* Remove C Prefix */
%rename(Math) CMath;
%rename(Statistics) CStatistics;
#ifdef USE_GPL_SHOGUN
%rename(SparseInverseCovariance) CSparseInverseCovariance;
#endif //USE_GPL_SHOGUN

// fix overloaded methods in Math
#if defined(SWIGLUA) || defined(SWIGR)
Expand Down Expand Up @@ -194,7 +196,9 @@ namespace shogun
/* Include Class Headers to make them visible from within the target language */
%include <shogun/mathematics/Math.h>
%include <shogun/mathematics/Statistics.h>
#ifdef USE_GPL_SHOGUN
%include <shogun/mathematics/SparseInverseCovariance.h>
#endif //USE_GPL_SHOGUN

/* Log-det framework */
%include <shogun/mathematics/linalg/ratapprox/tracesampler/TraceSampler.h>
Expand Down
2 changes: 2 additions & 0 deletions src/interfaces/swig/Mathematics_includes.i
@@ -1,7 +1,9 @@
%{
#include <shogun/mathematics/Math.h>
#include <shogun/mathematics/Statistics.h>
#ifdef USE_GPL_SHOGUN
#include <shogun/mathematics/SparseInverseCovariance.h>
#endif //USE_GPL_SHOGUN

/* Log-det framework */
#include <shogun/mathematics/linalg/ratapprox/tracesampler/TraceSampler.h>
Expand Down
4 changes: 2 additions & 2 deletions src/interfaces/swig/Multiclass.i
Expand Up @@ -55,9 +55,9 @@
#ifdef USE_GPL_SHOGUN
%rename(MulticlassTreeGuidedLogisticRegression) CMulticlassTreeGuidedLogisticRegression;
%rename(MulticlassLogisticRegression) CMulticlassLogisticRegression;
%rename(MulticlassOCAS) CMulticlassOCAS;
#endif //USE_GPL_SHOGUN
%rename(MulticlassLibLinear) CMulticlassLibLinear;
%rename(MulticlassOCAS) CMulticlassOCAS;
%rename(MulticlassSVM) CMulticlassSVM;
%rename(MulticlassLibSVM) CMulticlassLibSVM;
%rename(LaRank) CLaRank;
Expand Down Expand Up @@ -126,9 +126,9 @@ namespace shogun
#ifdef USE_GPL_SHOGUN
%include <shogun/multiclass/MulticlassTreeGuidedLogisticRegression.h>
%include <shogun/multiclass/MulticlassLogisticRegression.h>
%include <shogun/multiclass/MulticlassOCAS.h>
#endif // USE_GPL_SHOGUN
%include <shogun/multiclass/MulticlassLibLinear.h>
%include <shogun/multiclass/MulticlassOCAS.h>
%include <shogun/multiclass/MulticlassSVM.h>
%include <shogun/multiclass/MulticlassLibSVM.h>
%include <shogun/multiclass/LaRank.h>
Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/swig/Multiclass_includes.i
Expand Up @@ -49,9 +49,9 @@
#ifdef USE_GPL_SHOGUN
#include <shogun/multiclass/MulticlassTreeGuidedLogisticRegression.h>
#include <shogun/multiclass/MulticlassLogisticRegression.h>
#include <shogun/multiclass/MulticlassOCAS.h>
#endif //USE_GPL_SHOGUN
#include <shogun/multiclass/MulticlassLibLinear.h>
#include <shogun/multiclass/MulticlassOCAS.h>
#include <shogun/multiclass/MulticlassSVM.h>
#include <shogun/multiclass/LaRank.h>
#include <shogun/multiclass/MulticlassLibSVM.h>
Expand Down
8 changes: 7 additions & 1 deletion src/interfaces/swig/Structure.i
Expand Up @@ -56,11 +56,13 @@
%rename(StructuredOutputMachine) CStructuredOutputMachine;
%rename(LinearStructuredOutputMachine) CLinearStructuredOutputMachine;
%rename(KernelStructuredOutputMachine) CKernelStructuredOutputMachine;
%rename(DualLibQPBMSOSVM) CDualLibQPBMSOSVM;

#ifdef USE_GPL_SHOGUN
%rename(DualLibQPBMSOSVM) CDualLibQPBMSOSVM;
#ifdef USE_MOSEK
%rename(PrimalMosekSOSVM) CPrimalMosekSOSVM;
#endif /* USE_MOSEK */
#endif //USE_GPL_SHOGUN

%rename(StochasticSOSVM) CStochasticSOSVM;
%rename(FWSOSVM) CFWSOSVM;
Expand All @@ -74,7 +76,9 @@
%include <shogun/structure/IntronList.h>
%include <shogun/structure/SegmentLoss.h>

#ifdef USE_GPL_SHOGUN
%include <shogun/structure/BmrmStatistics.h>
#endif //USE_GPL_SHOGUN
%include <shogun/structure/StructuredModel.h>
%include <shogun/structure/MulticlassModel.h>
%include <shogun/structure/MulticlassSOLabels.h>
Expand Down Expand Up @@ -105,11 +109,13 @@
%include <shogun/machine/LinearStructuredOutputMachine.h>
%include <shogun/machine/KernelStructuredOutputMachine.h>

#ifdef USE_GPL_SHOGUN
%include <shogun/structure/DualLibQPBMSOSVM.h>

#ifdef USE_MOSEK
%include <shogun/structure/PrimalMosekSOSVM.h>
#endif /* USE_MOSEK */
#endif //USE_GPL_SHOGUN

%include <shogun/structure/StochasticSOSVM.h>
%include <shogun/structure/FWSOSVM.h>
9 changes: 6 additions & 3 deletions src/interfaces/swig/Structure_includes.i
Expand Up @@ -6,8 +6,10 @@
#include <shogun/structure/PlifMatrix.h>
#include <shogun/structure/IntronList.h>
#include <shogun/structure/SegmentLoss.h>


#ifdef USE_GPL_SHOGUN
#include <shogun/structure/BmrmStatistics.h>
#endif //USE_GPL_SHOGUN
#include <shogun/structure/StructuredModel.h>
#include <shogun/structure/MulticlassModel.h>
#include <shogun/structure/MulticlassSOLabels.h>
Expand Down Expand Up @@ -38,11 +40,12 @@
#include <shogun/machine/LinearStructuredOutputMachine.h>
#include <shogun/machine/KernelStructuredOutputMachine.h>

#include <shogun/structure/DualLibQPBMSOSVM.h>

#ifdef USE_GPL_SHOGUN
#include <shogun/structure/DualLibQPBMSOSVM.h>
#ifdef USE_MOSEK
#include <shogun/structure/PrimalMosekSOSVM.h>
#endif /* USE_MOSEK */
#endif //USE_GPL_SHOGUN

#include <shogun/structure/StochasticSOSVM.h>
#include <shogun/structure/FWSOSVM.h>
Expand Down
4 changes: 4 additions & 0 deletions src/interfaces/swig/Transfer.i
Expand Up @@ -20,12 +20,14 @@
%rename(TaskRelationBase) CTaskRelation;
%rename(TaskTree) CTaskTree;
%rename(TaskGroup) CTaskGroup;
#ifdef USE_GPL_SHOGUN
%rename(MultitaskLinearMachineBase) CMultitaskLinearMachine;
%rename(MultitaskLeastSquaresRegression) CMultitaskLeastSquaresRegression;
%rename(MultitaskLogisticRegression) CMultitaskLogisticRegression;
%rename(MultitaskL12LogisticRegression) CMultitaskL12LogisticRegression;
%rename(MultitaskTraceLogisticRegression) CMultitaskTraceLogisticRegression;
%rename(MultitaskClusteredLogisticRegression) CMultitaskClusteredLogisticRegression;
#endif //USE_GPL_SHOGUN

%rename(MultitaskROCEvaluation) CMultitaskROCEvaluation;

Expand All @@ -50,11 +52,13 @@
%include <shogun/transfer/multitask/TaskRelation.h>
%include <shogun/transfer/multitask/TaskTree.h>
%include <shogun/transfer/multitask/TaskGroup.h>
#ifdef USE_GPL_SHOGUN
%include <shogun/transfer/multitask/MultitaskLinearMachine.h>
%include <shogun/transfer/multitask/MultitaskLeastSquaresRegression.h>
%include <shogun/transfer/multitask/MultitaskLogisticRegression.h>
%include <shogun/transfer/multitask/MultitaskL12LogisticRegression.h>
%include <shogun/transfer/multitask/MultitaskTraceLogisticRegression.h>
#endif //USE_GPL_SHOGUN

%include <shogun/transfer/multitask/MultitaskROCEvaluation.h>
%include <shogun/transfer/multitask/LibLinearMTL.h>
Expand Down
2 changes: 2 additions & 0 deletions src/interfaces/swig/Transfer_includes.i
Expand Up @@ -11,11 +11,13 @@
#include <shogun/transfer/multitask/TaskRelation.h>
#include <shogun/transfer/multitask/TaskTree.h>
#include <shogun/transfer/multitask/TaskGroup.h>
#ifdef USE_GPL_SHOGUN
#include <shogun/transfer/multitask/MultitaskLinearMachine.h>
#include <shogun/transfer/multitask/MultitaskLeastSquaresRegression.h>
#include <shogun/transfer/multitask/MultitaskLogisticRegression.h>
#include <shogun/transfer/multitask/MultitaskL12LogisticRegression.h>
#include <shogun/transfer/multitask/MultitaskTraceLogisticRegression.h>
#endif //USE_GPL_SHOGUN

#include <shogun/transfer/multitask/MultitaskROCEvaluation.h>

Expand Down
3 changes: 3 additions & 0 deletions tests/unit/classifier/svm/SVMOcas_unittest.cc
@@ -1,4 +1,7 @@
#include <shogun/lib/config.h>
#ifdef USE_GPL_SHOGUN
#include <shogun/classifier/svm/SVMOcas.h>
#endif // USE_GPL_SHOGUN
#include <shogun/evaluation/ContingencyTableEvaluation.h>
#include <shogun/features/DataGenerator.h>
#include <shogun/features/DenseFeatures.h>
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/latent/LatentSVM_unittest.cc
@@ -1,8 +1,8 @@
#include "MockLatentModel.h"
#include <shogun/lib/config.h>
#include <shogun/latent/LatentSVM.h>

#ifdef USE_GPL_SHOGUN
#include <shogun/latent/LatentSVM.h>

using namespace shogun;
using ::testing::Return;
Expand Down
4 changes: 1 addition & 3 deletions tests/unit/multiclass/MulticlassOCAS_unittest.cc
Expand Up @@ -2,11 +2,9 @@
#include <shogun/evaluation/MulticlassAccuracy.h>
#include <shogun/features/DataGenerator.h>
#include <shogun/features/DenseFeatures.h>
#include <shogun/multiclass/MulticlassOCAS.h>

#include <gtest/gtest.h>

#ifdef USE_GPL_SHOGUN
#include <shogun/multiclass/MulticlassOCAS.h>

using namespace shogun;

Expand Down

0 comments on commit 846d0dd

Please sign in to comment.