From 466e915fabbe54dd72e2ec10de137f1cfc4c07dd Mon Sep 17 00:00:00 2001 From: lambday Date: Thu, 5 May 2016 16:36:05 +0100 Subject: [PATCH] temporary turned off GPL flag for QP solver --- .../internals/OptimizationSolver.cpp | 30 +++++++++++-------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/src/shogun/statistical_testing/internals/OptimizationSolver.cpp b/src/shogun/statistical_testing/internals/OptimizationSolver.cpp index 1aee9360f23..47d944566e7 100644 --- a/src/shogun/statistical_testing/internals/OptimizationSolver.cpp +++ b/src/shogun/statistical_testing/internals/OptimizationSolver.cpp @@ -16,9 +16,9 @@ #include #include -#ifdef USE_GPL_SHOGUN +//#ifdef USE_GPL_SHOGUN #include -#endif // USE_GPL_SHOGUN +//#endif // USE_GPL_SHOGUN using namespace shogun; using namespace internal; @@ -26,7 +26,7 @@ using namespace internal; struct OptimizationSolver::Self { Self(SGVector mmds, SGMatrix Q); -#ifdef USE_GPL_SHOGUN +//#ifdef USE_GPL_SHOGUN SGVector solve() const; void init(); static const float64_t* get_Q_col(uint32_t i); @@ -37,19 +37,23 @@ struct OptimizationSolver::Self float64_t opt_low_cut; SGVector m_mmds; static SGMatrix m_Q; -#endif // USE_GPL_SHOGUN +//#endif // USE_GPL_SHOGUN }; +//#ifdef USE_GPL_SHOGUN +SGMatrix OptimizationSolver::Self::m_Q=SGMatrix(); +//#endif // USE_GPL_SHOGUN + OptimizationSolver::Self::Self(SGVector mmds, SGMatrix Q) { -#ifdef USE_GPL_SHOGUN +//#ifdef USE_GPL_SHOGUN m_Q=Q; m_mmds=mmds; init(); -#endif // USE_GPL_SHOGUN +//#endif // USE_GPL_SHOGUN } -#ifdef USE_GPL_SHOGUN +//#ifdef USE_GPL_SHOGUN void OptimizationSolver::Self::init() { opt_max_iterations=10000; @@ -136,7 +140,7 @@ SGVector OptimizationSolver::Self::solve() const } return weights; } -#endif // USE_GPL_SHOGUN +//#endif // USE_GPL_SHOGUN OptimizationSolver::OptimizationSolver(const SGVector& mmds, const SGMatrix& Q) { @@ -149,10 +153,10 @@ OptimizationSolver::~OptimizationSolver() SGVector OptimizationSolver::solve() const { -#ifdef USE_GPL_SHOGUN +//#ifdef USE_GPL_SHOGUN return self->solve(); -#else // USE_GPL_SHOGUN - SG_SWARNING("Presently this feature is only available with GNU GPLv3 license!"); - return SGVector(); -#endif // USE_GPL_SHOGUN +//#else // USE_GPL_SHOGUN +// SG_SWARNING("Presently this feature is only available with GNU GPLv3 license!"); +// return SGVector(); +//#endif // USE_GPL_SHOGUN }