diagonal_function.h
Go to the documentation of this file.
1 
40 #ifndef HIGH_PRECISION_PSO_FUNCTION_DIAGONAL_FUNCTION_H_
41 #define HIGH_PRECISION_PSO_FUNCTION_DIAGONAL_FUNCTION_H_
42 
43 #include "function/function.h"
44 
45 namespace highprecisionpso {
46 
52 class DiagonalFunction: public Function {
53 public:
59  DiagonalFunction(double scale);
67  mpf_t* Eval(const std::vector<mpf_t*> & pos);
68  std::string GetName();
69  mpf_t* DistanceTo1DLocalOptimum(const std::vector<mpf_t*> & pos, int d);
70 
71 private:
72  const double scale_;
73 };
74 
75 } // namespace highprecisionpso
76 
77 #endif /* HIGH_PRECISION_PSO_FUNCTION_DIAGONAL_FUNCTION_H_ */
This file contains abstract classes for function generation.
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...
std::string GetName()
Returns a string representation of this object.
mpf_t * Eval(const std::vector< mpf_t * > &pos)
Evaluates the function at the specified position.
DiagonalFunction(double scale)
The constructor, which specifies the weight of the diagonal part of the function. ...
This class implements the diagonal function, which represents a function with optimum at the origin a...
Definition: diagonal_function.h:52
This class is an abstract class. It supplies the interface for objective functions.
Definition: function.h:74
base namespace for this project.
Definition: absorption.h:45