MKLMultiClassGLPK.h

Go to the documentation of this file.
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 "base/SGObject.h"
00016 
00017 #ifdef USE_GLPK
00018 #include <glpk.h>
00019 #endif
00020 
00021 namespace shogun
00022 {
00028 class MKLMultiClassGLPK: public CSGObject
00029 {
00030 public:
00034     MKLMultiClassGLPK();
00038     virtual ~MKLMultiClassGLPK();
00039 
00046     virtual void setup(const int32_t numkernels2);
00047 
00056     virtual void addconstraint(const ::std::vector<float64_t> & normw2,
00057             const float64_t sumofpositivealphas);
00058 
00064     virtual void computeweights(std::vector<float64_t> & weights2);
00065 
00067     inline virtual const char* get_name() const
00068     {
00069         return "MKLMultiClassGLPK";
00070     }
00071 
00072 protected:
00077     MKLMultiClassGLPK(MKLMultiClassGLPK & gl);
00082     MKLMultiClassGLPK operator=(MKLMultiClassGLPK & gl);
00083 
00084 protected:
00086     int32_t numkernels;
00087 #ifdef USE_GLPK
00088 
00089     glp_prob* linearproblem;
00090 #endif
00091 };
00092 }
00093 
00094 #endif

SHOGUN Machine Learning Toolbox - Documentation