This class represents a function with constant random positive (semi) definite derivative. More...
#include <random_positive_definite.h>
Public Member Functions | |
RandomPositiveDefiniteSecondDerivative (std::vector< std::string > rng_description) | |
The constructor, where the description of the random number generator can be specified. More... | |
~RandomPositiveDefiniteSecondDerivative () | |
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 product transpose(pos) * A * pos, where A is a random matrix. 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 function with constant random positive (semi) definite derivative.
Constructor & Destructor Documentation
highprecisionpso::RandomPositiveDefiniteSecondDerivative::RandomPositiveDefiniteSecondDerivative | ( | std::vector< std::string > | rng_description | ) |
The constructor, where the description of the random number generator can be specified.
- Parameters
-
rng_description The description of the random number generator.
highprecisionpso::RandomPositiveDefiniteSecondDerivative::~RandomPositiveDefiniteSecondDerivative | ( | ) |
The destructor.
Member Function Documentation
|
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.
For a given position all values (beside the value in the specified dimension) are regarded as constants. By the evaluation of a quadratic equation, where the value of the position in the specified dimension is varied, a local optimum is calculated. The result is the distance of the evaluated position and the found local optimum.
- Parameters
-
pos The position. d The index of the observed dimension.
- Returns
- The distance to the next local optimum in a single dimension setting.
Reimplemented from highprecisionpso::Function.
|
virtual |
Returns the product transpose(pos) * A * pos, where A is a random matrix.
The random matrix A is generated according to the specified random number generator. Let D be the number of dimensions. Then a D times D matrix of random long long values is generated. This matrix is multiplied by its transposed matrix to generate the positive (semi) definite matrix A. If the random number generator is not bad then the probability, that the matrix A is positive definite and not only positive semi definite, is very large.
- Parameters
-
pos The position vector.
- Returns
- Transpose(pos) * A * pos.
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/random_positive_definite.h