highprecisionpso::ScaledSphereRand Class Reference

This class represents a randomly scaled version of the well known sphere function. More...

#include <scaled_sphere.h>

Inheritance diagram for highprecisionpso::ScaledSphereRand:

Public Member Functions

 ScaledSphereRand (std::vector< std::string > rng_description)
 The constructor, where the random number generator can be specified. More...
 
 ~ScaledSphereRand ()
 The destructor. More...
 
mpf_t * DistanceTo1DLocalOptimum (const std::vector< mpf_t * > &pos, int d)
 Calculates for a position and a dimension the next local optimum if only the value of the position in the specified dimension is varied and returns the distance to it. More...
 
mpf_t * Eval (const std::vector< mpf_t * > &pos)
 Returns the evaluation of the randomly scaled sphere function evaluated at the given position. More...
 
std::string GetName ()
 Returns a string representation of this object. More...
 
- Public Member Functions inherited from highprecisionpso::Function
 Function ()
 A constructor. More...
 
 Function (double search_space_lower_bound, double search_space_upper_bound)
 A constructor, specifying the lower and upper search space bounds. More...
 
 Function (std::vector< double > search_space_lower_bound, std::vector< double > search_space_upper_bound)
 A constructor specifying the lower and upper search space bounds. More...
 
virtual ~Function ()
 The destructor. More...
 
virtual mpf_t * DistanceTo1DLocalOptimumTernarySearch (const std::vector< mpf_t * > &pos, int d, mpf_t *start_distance)
 Calculates for a position and a dimension the next local optimum if only the value of the position in the specified dimension is varied and returns the distance to it. More...
 
mpf_t * Evaluate (const std::vector< mpf_t * > &pos)
 This is the initial function for evaluation of a position. More...
 
virtual std::vector< mpf_t * > GetLowerSearchSpaceBound ()
 Returns the lower search space bound of the search space for this objective function. More...
 
virtual std::vector< mpf_t * > GetUpperSearchSpaceBound ()
 Returns the upper search space bound of the search space for this objective function. More...
 
void InitSearchSpaceBounds ()
 Initializes the search space bounds. More...
 
void SetFunctionBound (SearchSpaceBound *search_space_bound)
 Updates the bound of the search space according to the given data. More...
 

Detailed Description

This class represents a randomly scaled version of the well known sphere function.

Constructor & Destructor Documentation

highprecisionpso::ScaledSphereRand::ScaledSphereRand ( std::vector< std::string >  rng_description)

The constructor, where the random number generator can be specified.

Parameters
rng_descriptionThe description of the random number generator.
highprecisionpso::ScaledSphereRand::~ScaledSphereRand ( )

The destructor.

Member Function Documentation

mpf_t* highprecisionpso::ScaledSphereRand::DistanceTo1DLocalOptimum ( const std::vector< mpf_t * > &  pos,
int  d 
)
virtual

Calculates for a position and a dimension the next local optimum if only the value of the position in the specified dimension is varied and returns the distance to it.

Parameters
posThe position.
dThe index of the observed dimension.
Returns
The absolute value of the position entry in dimension d.

Reimplemented from highprecisionpso::Function.

mpf_t* highprecisionpso::ScaledSphereRand::Eval ( const std::vector< mpf_t * > &  pos)
virtual

Returns the evaluation of the randomly scaled sphere function evaluated at the given position.

Parameters
posThe position vector.
Returns
d=0..D-1 scale[d] · pos[d]2.

scale is a once randomly generated vector with non negative entries.

Implements highprecisionpso::Function.

std::string highprecisionpso::ScaledSphereRand::GetName ( )
virtual

Returns a string representation of this object.

Returns
The name of the object.

Implements highprecisionpso::Function.


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