shark::GeneralQuadraticProblem< MatrixT > Class Template Reference

Quadratic Problem with only Box-Constraints Let K the kernel matrix, than the problem has the form. More...

#include <shark/Algorithms/QP/QpSolver.h>

Public Types

typedef MatrixT MatrixType
 
typedef MatrixType::QpFloatType QpFloatType
 

Public Member Functions

 GeneralQuadraticProblem (MatrixType &quadratic)
 
 GeneralQuadraticProblem (MatrixType &quadratic, Data< unsigned int > const &labels, Data< double > const &weights, RealVector const &regularizers)
 constructor which initializes a C-SVM problem with weighted datapoints and different regularizers for every class More...
 
std::size_t dimensions () const
 
void flipCoordinates (std::size_t i, std::size_t j)
 exchange two variables via the permutation More...
 
void scaleBoxConstraints (double factor)
 Scales all box constraints by a constant factor and adapts the solution by scaling it by the same factor. More...
 

Public Attributes

MatrixTypequadratic
 representation of the quadratic part of the objective function More...
 
RealVector linear
 Linear part of the problem. More...
 
RealVector alpha
 Solution candidate. More...
 
RealVector diagonal
 
std::vector< std::size_t > permutation
 permutation of the variables alpha, gradient, etc. More...
 
RealVector boxMin
 component-wise lower bound More...
 
RealVector boxMax
 component-wise upper bound More...
 

Detailed Description

template<class MatrixT>
class shark::GeneralQuadraticProblem< MatrixT >

Quadratic Problem with only Box-Constraints Let K the kernel matrix, than the problem has the form.

max_ - 1/2 ^T K + ^Tv under constraints: l_i <= <= u_i

Definition at line 52 of file QpSolver.h.

Member Typedef Documentation

◆ MatrixType

template<class MatrixT>
typedef MatrixT shark::GeneralQuadraticProblem< MatrixT >::MatrixType

Definition at line 54 of file QpSolver.h.

◆ QpFloatType

template<class MatrixT>
typedef MatrixType::QpFloatType shark::GeneralQuadraticProblem< MatrixT >::QpFloatType

Definition at line 55 of file QpSolver.h.

Constructor & Destructor Documentation

◆ GeneralQuadraticProblem() [1/2]

◆ GeneralQuadraticProblem() [2/2]

template<class MatrixT>
shark::GeneralQuadraticProblem< MatrixT >::GeneralQuadraticProblem ( MatrixType quadratic,
Data< unsigned int > const &  labels,
Data< double > const &  weights,
RealVector const &  regularizers 
)
inline

Member Function Documentation

◆ dimensions()

◆ flipCoordinates()

◆ scaleBoxConstraints()

template<class MatrixT>
void shark::GeneralQuadraticProblem< MatrixT >::scaleBoxConstraints ( double  factor)
inline

Scales all box constraints by a constant factor and adapts the solution by scaling it by the same factor.

Definition at line 130 of file QpSolver.h.

References shark::GeneralQuadraticProblem< MatrixT >::alpha, shark::GeneralQuadraticProblem< MatrixT >::boxMax, and shark::GeneralQuadraticProblem< MatrixT >::boxMin.

Member Data Documentation

◆ alpha

◆ boxMax

◆ boxMin

◆ diagonal

template<class MatrixT>
RealVector shark::GeneralQuadraticProblem< MatrixT >::diagonal

◆ linear

◆ permutation

◆ quadratic


The documentation for this class was generated from the following file: