22 using namespace shogun;
29 glp_term_out(GLP_OFF);
48 " MKLMulticlassGLPK MKLMulticlassGLPK::operator=(...): must "
49 "not be called, glpk structure is currently not copyable");
56 " MKLMulticlassGLPK::MKLMulticlassGLPK(MKLMulticlassGLPK & gl):"
57 " must not be called, glpk structure is currently not copyable");
67 SG_ERROR(
"void glpkwrapper::setup(const int32_tnumkernels): input "
88 glp_set_col_bnds((glp_prob*)
linearproblem,offset+i,GLP_DB,0.0,1.0);
95 int32_t*betainds(NULL);
96 betainds=SG_MALLOC(
int, 1+numkernels);
110 glp_set_mat_row((glp_prob*)
linearproblem,1,numkernels, betainds,betacoeffs);
120 "glpk.h from GNU glpk not included at compile time necessary "
129 #if defined(USE_GLPK)
132 ASSERT (sumofpositivealphas>=0)
136 int32_t curconstraint=glp_get_num_rows((glp_prob*)
linearproblem);
138 int32_t *betainds(NULL);
155 betacoeffs[2+i]=0.5*normw2[i];
157 glp_set_mat_row((glp_prob*)
linearproblem,curconstraint,1+numkernels, betainds,
159 glp_set_row_bnds((glp_prob*)
linearproblem,curconstraint,GLP_LO,sumofpositivealphas,
160 sumofpositivealphas);
170 "glpk.h from GNU glpk not included at compile time necessary "
177 #if defined(USE_GLPK)
185 weights2[i]=glp_get_col_prim((glp_prob*)
linearproblem, i+2);
186 weights2[i]= ::std::max(0.0, ::std::min(1.0,weights2[i]));
198 SG_ERROR(
"void glpkwrapper::computeweights(std::vector<float64_t> & "
199 "weights2): sum of weights nonpositive %f\n",sum);
202 "glpk.h from GNU glpk not included at compile time necessary "
virtual void computeweights(std::vector< float64_t > &weights2)
virtual ~MKLMulticlassGLPK()
MKLMulticlassGLPK is a helper class for MKLMulticlass.
MKLMulticlassGLPK operator=(MKLMulticlassGLPK &gl)
virtual void addconstraint(const ::std::vector< float64_t > &normw2, const float64_t sumofpositivealphas)
virtual void setup(const int32_t numkernels2)