@@ -59,17 +59,6 @@ class AckleyFunction
5959 // ! Return 1 (the number of functions).
6060 size_t NumFunctions () const { return 1 ; }
6161
62- // ! Get the starting point.
63- template <typename MatType = arma::mat>
64- MatType GetInitialPoint () const { return MatType (" 0.02; 0.02" ); }
65-
66- // ! Get the final point.
67- template <typename MatType = arma::mat>
68- MatType GetFinalPoint () const { return MatType (" 0.0; 0.0" ); }
69-
70- // ! Get the final objective.
71- double GetFinalObjective () const { return 0.0 ; }
72-
7362 /* *
7463 * Evaluate a function for a particular batch-size.
7564 *
@@ -123,6 +112,22 @@ class AckleyFunction
123112 // ! Modify the value used for numerical stability.
124113 double & Epsilon () { return epsilon; }
125114
115+ // Note: GetInitialPoint(), GetFinalPoint(), and GetFinalObjective() are not
116+ // required for using ensmallen to optimize this function! They are
117+ // specifically used as a convenience just for ensmallen's testing
118+ // infrastructure.
119+
120+ // ! Get the starting point.
121+ template <typename MatType = arma::mat>
122+ MatType GetInitialPoint () const { return MatType (" 0.02; 0.02" ); }
123+
124+ // ! Get the final point.
125+ template <typename MatType = arma::mat>
126+ MatType GetFinalPoint () const { return MatType (" 0.0; 0.0" ); }
127+
128+ // ! Get the final objective.
129+ double GetFinalObjective () const { return 0.0 ; }
130+
126131 private:
127132 // ! The value of the multiplicative constant.
128133 double c;
0 commit comments