SOT
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
sot::RotatedProblem< OptProb > Class Template Reference

Rotated and translated problem. More...

#include <test_problems.h>

Inheritance diagram for sot::RotatedProblem< OptProb >:
sot::TestProblem sot::Problem

Public Member Functions

 RotatedProblem (int dim)
 Constructor. More...
 
mat rotation () const
 Method that returns the rotation matrix. More...
 
vec translation () const
 Method that returns the translation vector. More...
 
vec lBounds () const
 Method for getting the lower variable bounds. More...
 
vec uBounds () const
 Method for getting the upper variable bounds. More...
 
int dim () const
 Method for getting the number of dimensions. More...
 
double min () const
 Method for getting global minimum value. More...
 
vec optimum () const
 Method for getting the global minimizer. More...
 
std::string name () const
 Method for getting the name of the optimization problem. More...
 
double eval (const vec &x) const
 Method for evaluating the objective function. More...
 
- Public Member Functions inherited from sot::TestProblem
vec evals (const mat &points) const
 Method for evaluating the objective function at multiple points. More...
 

Protected Member Functions

void createTranslation ()
 Generates a random translation vector.
 
void createRotation ()
 Generates a random rotation matrix.
 

Protected Attributes

std::shared_ptr< ProblemmProblem
 
vec mTranslation
 
mat mRotation
 
int mDim
 
vec mxLow
 
vec mxUp
 
vec mOptimum
 
double mMinimum
 
std::string mName
 

Detailed Description

template<class OptProb>
class sot::RotatedProblem< OptProb >

Rotated and translated problem.

Turns a possibly separable problem into a non-separable one. This is done by generating an orthogonal matrix \(Q\) and a vector \( t\), where \( t\) is in the domain of \( f(x)\). We define the new objective function

\(g(x) = f(x_{opt} + Q (x - t))\)

We can see that \(g(t) = f(x_{opt})\) so t is the global minimum of \( g\), and we can also see that \( g\) isn't separable as long as \( Q\) isn't.

Template Parameters
OptProblemThe optimization problem (with Problem as a base class) that is rotated and translated into a non-separable optimization problem.
Author
David Eriksson, dme65.nosp@m.@cor.nosp@m.nell..nosp@m.edu

Constructor & Destructor Documentation

template<class OptProb >
sot::RotatedProblem< OptProb >::RotatedProblem ( int  dim)
inline

Constructor.

Parameters
dimNumber of dimensions

Member Function Documentation

template<class OptProb >
int sot::RotatedProblem< OptProb >::dim ( ) const
inlinevirtual

Method for getting the number of dimensions.

Returns
The number of dimensions

Implements sot::Problem.

template<class OptProb >
double sot::RotatedProblem< OptProb >::eval ( const vec point) const
inlinevirtual

Method for evaluating the objective function.

Parameters
pointIs the next point for which to evaluate the objective function
Returns
The value of the objective function at the input

Implements sot::Problem.

template<class OptProb >
vec sot::RotatedProblem< OptProb >::lBounds ( ) const
inlinevirtual

Method for getting the lower variable bounds.

Returns
Upper variable bounds

Implements sot::Problem.

template<class OptProb >
double sot::RotatedProblem< OptProb >::min ( ) const
inlinevirtual

Method for getting global minimum value.

Returns
Value at the global minumum

Implements sot::Problem.

template<class OptProb >
std::string sot::RotatedProblem< OptProb >::name ( ) const
inlinevirtual

Method for getting the name of the optimization problem.

Returns
The optimization problem name

Implements sot::Problem.

template<class OptProb >
vec sot::RotatedProblem< OptProb >::optimum ( ) const
inlinevirtual

Method for getting the global minimizer.

Returns
The global minimizer

Implements sot::Problem.

template<class OptProb >
mat sot::RotatedProblem< OptProb >::rotation ( ) const
inline

Method that returns the rotation matrix.

Returns
Rotation matrix
template<class OptProb >
vec sot::RotatedProblem< OptProb >::translation ( ) const
inline

Method that returns the translation vector.

Returns
Translation vector
template<class OptProb >
vec sot::RotatedProblem< OptProb >::uBounds ( ) const
inlinevirtual

Method for getting the upper variable bounds.

Returns
Upper variable bounds

Implements sot::Problem.

Member Data Documentation

template<class OptProb >
int sot::RotatedProblem< OptProb >::mDim
protected

Number of dimensions (extracted from mProblem)

template<class OptProb >
double sot::RotatedProblem< OptProb >::mMinimum
protected

Global minimum value

template<class OptProb >
std::string sot::RotatedProblem< OptProb >::mName
protected

Optimization problem name

template<class OptProb >
vec sot::RotatedProblem< OptProb >::mOptimum
protected

Global minimizer (same as mTranslation)

template<class OptProb >
std::shared_ptr<Problem> sot::RotatedProblem< OptProb >::mProblem
protected

Shared pointer to the original optimization problem

template<class OptProb >
mat sot::RotatedProblem< OptProb >::mRotation
protected

Randomly generated rotation

template<class OptProb >
vec sot::RotatedProblem< OptProb >::mTranslation
protected

Randomly generated translation

template<class OptProb >
vec sot::RotatedProblem< OptProb >::mxLow
protected

Lower variable bounds (extracted from mProblem)

template<class OptProb >
vec sot::RotatedProblem< OptProb >::mxUp
protected

Upper variable bounds (extracted from mProblem)


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