single_different_direction.h
Go to the documentation of this file.
1 
40 #ifndef HIGH_PRECISION_PSO_FUNCTION_SINGLE_DIFFERENT_DIRECTION_H_
41 #define HIGH_PRECISION_PSO_FUNCTION_SINGLE_DIFFERENT_DIRECTION_H_
42 
43 #include "function/function.h"
44 
45 namespace highprecisionpso {
46 
66 
71 public:
80  SingleDifferentDirection(double single_dimension_exponent = 2.0,
81  double remaining_dimension_exponent = 2.0,
83  std::vector<std::string> rng_description = std::vector<std::string>(0));
105  mpf_t* Eval(const std::vector<mpf_t*> & pos);
106  std::string GetName();
107 
108 private:
109  void InitSpecialDirection(const std::vector<mpf_t*> & vec);
110  const double single_dimension_exponent_;
111  const double remaining_dimension_exponent_;
112  const SingleDifferentDirectionMode direction_mode_;
113  const std::vector<std::string> rng_description_;
114  std::vector<mpf_t*> special_direction_cached_;
115  unsigned int special_direction_cached_precision_;
116 };
117 
118 } // namespace highprecisionpso
119 
120 #endif /* HIGH_PRECISION_PSO_FUNCTION_SINGLE_DIFFERENT_DIRECTION_H_ */
This file contains abstract classes for function generation.
std::string GetName()
Returns a string representation of this object.
mpf_t * Eval(const std::vector< mpf_t * > &pos)
Returns the evaluation of the SingleDifferentDirection at the given position.
In this mode the special direction is randomly chosen according to the random number generator for th...
Definition: single_different_direction.h:65
SingleDifferentDirectionMode
This enumeration determines the specific behavior of the single different direction function...
Definition: single_different_direction.h:50
In this mode the special direction is the direction of the coordinate axis belonging to the first dim...
Definition: single_different_direction.h:55
This class implements a function with a special direction.
Definition: single_different_direction.h:70
SingleDifferentDirection(double single_dimension_exponent=2.0, double remaining_dimension_exponent=2.0, SingleDifferentDirectionMode mode=SINGLE_DIFFERENT_DIRECTION_MODE_FIRST, std::vector< std::string > rng_description=std::vector< std::string >(0))
The constructor.
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
In this mode the special direction is diagonal according to all dimensions. All entries of the direct...
Definition: single_different_direction.h:60