CSMOn
Convergence Stabilization Modeling operating in Online mode
ISearch.hpp
1 /*
2  * Copyright (c) 2017, Peter Frank Perroni (pfperroni@gmail.com)
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a copy
5  * of this software and associated documentation files (the "Software"), to deal
6  * in the Software without restriction, including without limitation the rights
7  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8  * copies of the Software, and to permit persons to whom the Software is
9  * furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included in
12  * all copies or substantial portions of the Software.
13  *
14  * Additionally, if used for any scientific purpose, the following reference
15  * must be cited:
16  *
17  * Peter Frank Perroni, Daniel Weingaertner, and Myriam Regattieri Delgado.
18  * 2017. Estimating Stop Conditions of Swarm Based Stochastic Metaheuristic
19  * Algorithms. In Proceedings of GECCO '17, Berlin, Germany, July 15-19, 2017,
20  * pg 43-50. DOI: http://dx.doi.org/10.1145/3071178.3071326
21  *
22  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
28  * THE SOFTWARE.
29  */
30 
31 #ifndef ISEARCH_HPP_
32 #define ISEARCH_HPP_
33 
40 class ISearch{
41 public:
42  ISearch(){}
43  virtual ~ISearch()=0;
47  virtual void startup()=0;
53  virtual void next(int M)=0;
60  virtual int getBestPos(double *_x)=0;
66  virtual int getNEvals()=0;
73  virtual double getFitness()=0;
74 };
75 
76 #endif /* ISEARCH_HPP_ */
virtual void startup()=0
Startup the search method.
The interface that the search methods must to implement.
Definition: ISearch.hpp:40
virtual double getFitness()=0
Get the best fitness value found up to the moment.
virtual void next(int M)=0
Obtain the next improvement.
virtual int getNEvals()=0
Get the number of fitness function evaluations performed up to the moment.
virtual int getBestPos(double *_x)=0
Get the best result obtained up to the moment.