highprecisionpso::Rastrigin Class Reference
This class represents the well known test function rastrigin. More...
#include <rastrigin.h>
Inheritance diagram for highprecisionpso::Rastrigin:
Public Member Functions | |
Rastrigin () | |
The constructor. More... | |
mpf_t * | Eval (const std::vector< mpf_t * > &pos) |
Returns the evaluation of the rastrigin 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 * | 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... | |
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 the well known test function rastrigin.
Constructor & Destructor Documentation
highprecisionpso::Rastrigin::Rastrigin | ( | ) |
The constructor.
Member Function Documentation
|
virtual |
Returns the evaluation of the rastrigin function evaluated at the given position.
The standard bounds of the search space are [-5.12,5.12] in each dimension.
- Parameters
-
pos The position vector.
- Returns
- 10 · D + ∑d=1..D-1( pos[d]2 - 10 cos( 2π · pos[d] ) ).
Implements highprecisionpso::Function.
|
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:
- src/function/rastrigin.h