00001 /* 00002 * This program is free software; you can redistribute it and/or modify 00003 * it under the terms of the GNU General Public License as published by 00004 * the Free Software Foundation; either version 3 of the License, or 00005 * (at your option) any later version. 00006 * 00007 * Written (W) 2009 Alexander Binder 00008 * Copyright (C) 2009 Fraunhofer Institute FIRST and Max-Planck-Society 00009 */ 00010 00011 #ifndef MKLMULTICLASSGLPK_H_ 00012 #define MKLMULTICLASSGLPK_H_ 00013 00014 #include <vector> 00015 #include <shogun/base/SGObject.h> 00016 #include <shogun/classifier/mkl/MKLMulticlassOptimizationBase.h> 00017 00018 namespace shogun 00019 { 00025 class MKLMulticlassGLPK: public MKLMulticlassOptimizationBase 00026 { 00027 public: 00031 MKLMulticlassGLPK(); 00035 virtual ~MKLMulticlassGLPK(); 00036 00043 virtual void setup(const int32_t numkernels2); 00044 00053 virtual void addconstraint(const ::std::vector<float64_t> & normw2, 00054 const float64_t sumofpositivealphas); 00055 00061 virtual void computeweights(std::vector<float64_t> & weights2); 00062 00064 virtual const char* get_name() const 00065 { 00066 return "MKLMulticlassGLPK"; 00067 } 00068 00069 protected: 00074 MKLMulticlassGLPK(MKLMulticlassGLPK & gl); 00079 MKLMulticlassGLPK operator=(MKLMulticlassGLPK & gl); 00080 00081 protected: 00083 int32_t numkernels; 00085 void* linearproblem; 00086 }; 00087 } 00088 00089 #endif