ObjectiveFunctionVS< T > Class Template Reference

Objective function on a vector space (VS). More...

#include <ObjectiveFunction.h>

Inheritance diagram for ObjectiveFunctionVS< T >:

ObjectiveFunctionT< T * > ObjectiveFunction

List of all members.

Public Member Functions

 ObjectiveFunctionVS (unsigned d=0, ConstraintHandler< T * > *constrainthandler=NULL)
 Constructor.
 ~ObjectiveFunctionVS ()
 Destructor.
void init (unsigned d)
 Define the search space dimension.
unsigned dimension () const
 Retreive the search space dimension.
double operator() (const Array< T > &point)
 overloaded evaluation of a single objective function
double operator() (const std::vector< T > &point)
 overloaded evaluation of a single objective function
double operator() (double *const &point)
 evaluation of a single objective function
void result (const Array< T > &point, std::vector< double > &value)
 objective function evaluation
void result (const std::vector< T > &point, std::vector< double > &value)
 objective function evaluation
bool ProposeStartingPoint (T *&point) const
 For a BoxConstraintHandler we can automatically propose a starting point.
bool isFeasible (const Array< T > &point) const
 feasibility check
bool isFeasible (const std::vector< T > &point) const
 feasibility check
bool closestFeasible (Array< T > &point) const
 if possible, return the closest feasible point
bool closestFeasible (std::vector< T > &point) const
 if possible, return the closest feasible point
bool ProposeStartingPoint (Array< T > &point) const
 if possible, propose a starting point
bool ProposeStartingPoint (std::vector< T > &point) const
 if possible, propose a starting point
virtual bool utopianFitness (std::vector< double > &value) const
 If possible, this method returns (a bound on) the best possible fitness.
virtual bool nadirFitness (std::vector< double > &value) const
 If possible, this method returns (a bound on) the worst possible fitness.

Protected Attributes

unsigned m_dimension
 search space dimension


Detailed Description

template<class T>
class ObjectiveFunctionVS< T >

Objective function on a vector space (VS).

The important special case that the search space is embedded in a real vector space is captured by this class. Simple c-arrays, vectors, or Shark Arrays can be used to represent points in the search space.

Definition at line 285 of file ObjectiveFunction.h.


Constructor & Destructor Documentation

template<class T >
ObjectiveFunctionVS< T >::ObjectiveFunctionVS ( unsigned  d = 0,
ConstraintHandler< T * > *  constrainthandler = NULL 
) [inline]

Constructor.

Definition at line 288 of file ObjectiveFunction.h.

template<class T >
ObjectiveFunctionVS< T >::~ObjectiveFunctionVS (  )  [inline]

Destructor.

Definition at line 294 of file ObjectiveFunction.h.


Member Function Documentation

template<class T >
bool ObjectiveFunctionVS< T >::closestFeasible ( std::vector< T > &  point  )  const [inline]

if possible, return the closest feasible point

Definition at line 373 of file ObjectiveFunction.h.

template<class T >
bool ObjectiveFunctionVS< T >::closestFeasible ( Array< T > &  point  )  const [inline]

if possible, return the closest feasible point

Definition at line 367 of file ObjectiveFunction.h.

Referenced by ObjectiveFunctionVS< double >::closestFeasible(), CMSASearch::run(), and CMASearch::run().

template<class T >
unsigned ObjectiveFunctionVS< T >::dimension (  )  const [inline]

template<class T >
void ObjectiveFunctionVS< T >::init ( unsigned  d  )  [inline]

Define the search space dimension.

Definition at line 298 of file ObjectiveFunction.h.

Referenced by TransformedObjectiveFunction::init(), and TransformedObjectiveFunction::initRandomRotation().

template<class T >
bool ObjectiveFunctionVS< T >::isFeasible ( const std::vector< T > &  point  )  const [inline]

feasibility check

Definition at line 361 of file ObjectiveFunction.h.

template<class T >
bool ObjectiveFunctionVS< T >::isFeasible ( const Array< T > &  point  )  const [inline]

feasibility check

Definition at line 355 of file ObjectiveFunction.h.

Referenced by ObjectiveFunctionVS< double >::isFeasible(), CMSASearch::run(), and CMASearch::run().

template<class T >
virtual bool ObjectiveFunctionVS< T >::nadirFitness ( std::vector< double > &  value  )  const [inline, virtual]

If possible, this method returns (a bound on) the worst possible fitness.

For single objective optimization this information is rarely of any use, while for multi objective optimization a so-called nadir point is important for the computation of standard quality indicators like the hypervolume.

Parameters:
fitness component wise worst fitness
Returns:
true if a nadir point is known, false otherwise

Reimplemented in BhinKorn, Schaffer, ZDT1, ZDT2, ZDT3, ZDT4, ZDT6, IHR1, IHR2, IHR3, IHR6, ZZJ07_F1, ZZJ07_F2, ZZJ07_F3, ZZJ07_F4, ZZJ07_F5, ZZJ07_F6, ZZJ07_F7, ZZJ07_F8, ZZJ07_F9, ZZJ07_F10, LZ06_F1, LZ06_F2, LZ07_F1, LZ07_F2, LZ07_F3, LZ07_F4, LZ07_F5, LZ07_F6, LZ07_F7, LZ07_F8, LZ07_F9, DTLZ1, DTLZ2, DTLZ3, DTLZ4, DTLZ5, DTLZ6, DTLZ7, Superspheres, and TransformedObjectiveFunction.

Definition at line 412 of file ObjectiveFunction.h.

Referenced by TransformedObjectiveFunction::nadirFitness().

template<class T >
double ObjectiveFunctionVS< T >::operator() ( double *const &  point  )  [inline]

evaluation of a single objective function

Definition at line 318 of file ObjectiveFunction.h.

template<class T >
double ObjectiveFunctionVS< T >::operator() ( const std::vector< T > &  point  )  [inline]

overloaded evaluation of a single objective function

Definition at line 312 of file ObjectiveFunction.h.

template<class T >
double ObjectiveFunctionVS< T >::operator() ( const Array< T > &  point  )  [inline]

overloaded evaluation of a single objective function

Definition at line 306 of file ObjectiveFunction.h.

template<class T >
bool ObjectiveFunctionVS< T >::ProposeStartingPoint ( std::vector< T > &  point  )  const [inline]

if possible, propose a starting point

Definition at line 387 of file ObjectiveFunction.h.

template<class T >
bool ObjectiveFunctionVS< T >::ProposeStartingPoint ( Array< T > &  point  )  const [inline]

if possible, propose a starting point

Definition at line 380 of file ObjectiveFunction.h.

template<class T >
bool ObjectiveFunctionVS< T >::ProposeStartingPoint ( T *&  point  )  const [inline]

template<class T >
void ObjectiveFunctionVS< T >::result ( const std::vector< T > &  point,
std::vector< double > &  value 
) [inline]

objective function evaluation

Definition at line 333 of file ObjectiveFunction.h.

template<class T >
void ObjectiveFunctionVS< T >::result ( const Array< T > &  point,
std::vector< double > &  value 
) [inline]

objective function evaluation

Definition at line 327 of file ObjectiveFunction.h.

template<class T >
virtual bool ObjectiveFunctionVS< T >::utopianFitness ( std::vector< double > &  value  )  const [inline, virtual]

If possible, this method returns (a bound on) the best possible fitness.

For the single objective case the function should return the fitness in the global optimum. For the multi objective case this function should return a utopian point.

Parameters:
fitness component wise utopian fitness
Returns:
true if an utopian point is known, false otherwise

Reimplemented in BhinKorn, Schaffer, ZDT1, ZDT2, ZDT3, ZDT4, ZDT6, IHR1, IHR2, IHR3, IHR6, ZZJ07_F1, ZZJ07_F2, ZZJ07_F3, ZZJ07_F4, ZZJ07_F5, ZZJ07_F6, ZZJ07_F7, ZZJ07_F8, ZZJ07_F9, ZZJ07_F10, LZ06_F1, LZ06_F2, LZ07_F1, LZ07_F2, LZ07_F3, LZ07_F4, LZ07_F5, LZ07_F6, LZ07_F7, LZ07_F8, LZ07_F9, ELLIBase, CIGTABBase, DTLZ1, DTLZ2, DTLZ3, DTLZ4, DTLZ5, DTLZ6, DTLZ7, Superspheres, TransformedObjectiveFunction, Sphere, Ackley, Rastrigin, Griewangk, Rosenbrock, DiffPow, and SchwefelEllipsoid.

Definition at line 401 of file ObjectiveFunction.h.

Referenced by TransformedObjectiveFunction::utopianFitness().


Member Data Documentation

template<class T >
unsigned ObjectiveFunctionVS< T >::m_dimension [protected]


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