30 glp_term_out(GLP_OFF);
49 " MKLMulticlassGLPK MKLMulticlassGLPK::operator=(...): must "
50 "not be called, glpk structure is currently not copyable");
57 " MKLMulticlassGLPK::MKLMulticlassGLPK(MKLMulticlassGLPK & gl):"
58 " must not be called, glpk structure is currently not copyable");
68 SG_ERROR(
"void glpkwrapper::setup(const int32_tnumkernels): input "
89 glp_set_col_bnds((glp_prob*)
linearproblem,offset+i,GLP_DB,0.0,1.0);
96 int32_t*betainds(NULL);
97 betainds=SG_MALLOC(
int, 1+numkernels);
111 glp_set_mat_row((glp_prob*)
linearproblem,1,numkernels, betainds,betacoeffs);
121 "glpk.h from GNU glpk not included at compile time necessary "
130 #if defined(USE_GLPK)
133 ASSERT (sumofpositivealphas>=0)
137 int32_t curconstraint=glp_get_num_rows((glp_prob*)
linearproblem);
139 int32_t *betainds(NULL);
156 betacoeffs[2+i]=0.5*normw2[i];
158 glp_set_mat_row((glp_prob*)
linearproblem,curconstraint,1+numkernels, betainds,
160 glp_set_row_bnds((glp_prob*)
linearproblem,curconstraint,GLP_LO,sumofpositivealphas,
161 sumofpositivealphas);
171 "glpk.h from GNU glpk not included at compile time necessary "
178 #if defined(USE_GLPK)
186 weights2[i]=glp_get_col_prim((glp_prob*)
linearproblem, i+2);
187 weights2[i]=
::std::max(0.0, ::std::min(1.0,weights2[i]));
199 SG_ERROR(
"void glpkwrapper::computeweights(std::vector<float64_t> & "
200 "weights2): sum of weights nonpositive %f\n",sum);
203 "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)
Matrix::Scalar max(Matrix m)
virtual void setup(const int32_t numkernels2)