shark::GeneralQuadraticProblem< MatrixT > Class Template Reference

Most gneral problem formualtion, needs to be configured by hand. 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

MatrixType & quadratic
 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
 
RealVector boxMax
 

Detailed Description

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

Most gneral problem formualtion, needs to be configured by hand.

Definition at line 47 of file QpSolver.h.

Member Typedef Documentation

◆ MatrixType

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

Definition at line 49 of file QpSolver.h.

◆ QpFloatType

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

Definition at line 50 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 125 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: