27 glp_term_out(GLP_OFF);
46 " MKLMulticlassGLPK MKLMulticlassGLPK::operator=(...): must " 47 "not be called, glpk structure is currently not copyable");
54 " MKLMulticlassGLPK::MKLMulticlassGLPK(MKLMulticlassGLPK & gl):" 55 " must not be called, glpk structure is currently not copyable");
65 SG_ERROR(
"void glpkwrapper::setup(const int32_tnumkernels): input " 76 glp_add_cols((glp_prob*)linearproblem,1+
numkernels);
79 glp_set_col_bnds((glp_prob*)linearproblem,1,GLP_FR,0.0,0.0);
80 glp_set_obj_coef((glp_prob*)linearproblem,1,1.0);
86 glp_set_col_bnds((glp_prob*)linearproblem,offset+i,GLP_DB,0.0,1.0);
87 glp_set_obj_coef((glp_prob*)linearproblem,offset+i,0.0);
91 glp_add_rows((glp_prob*)linearproblem,1);
93 int32_t*betainds(NULL);
94 betainds=SG_MALLOC(
int, 1+numkernels);
109 glp_set_mat_row((glp_prob*)linearproblem,1,numkernels, betainds,betacoeffs);
110 glp_set_row_bnds((glp_prob*)linearproblem,1,GLP_FX,1.0,1.0);
119 "glpk.h from GNU glpk not included at compile time necessary " 128 #if defined(USE_GLPK) 131 ASSERT (sumofpositivealphas>=0)
135 int32_t curconstraint=glp_get_num_rows((glp_prob*)linearproblem);
137 int32_t *betainds(NULL);
154 betacoeffs[2+i]=0.5*normw2[i];
156 glp_set_mat_row((glp_prob*)linearproblem,curconstraint,1+numkernels, betainds,
158 glp_set_row_bnds((glp_prob*)linearproblem,curconstraint,GLP_LO,sumofpositivealphas,
159 sumofpositivealphas);
169 "glpk.h from GNU glpk not included at compile time necessary " 176 #if defined(USE_GLPK) 184 weights2[i]=glp_get_col_prim((glp_prob*) linearproblem, i+2);
185 weights2[i]= ::std::max(0.0, ::std::min(1.0,weights2[i]));
197 SG_ERROR(
"void glpkwrapper::computeweights(std::vector<float64_t> & " 198 "weights2): sum of weights nonpositive %f\n",sum);
201 "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.
all of classes and functions are contained in the shogun namespace
MKLMulticlassGLPK operator=(MKLMulticlassGLPK &gl)
virtual void addconstraint(const ::std::vector< float64_t > &normw2, const float64_t sumofpositivealphas)
virtual void setup(const int32_t numkernels2)