Salome HOME
80f23d20cde6f73c4e6f47badc559cfb422ba1dc
[modules/yacs.git] / src / engine / Plugin / simplex.hxx
1 //  Copyright (C) 2006-2008  CEA/DEN, EDF R&D
2 //
3 //  This library is free software; you can redistribute it and/or
4 //  modify it under the terms of the GNU Lesser General Public
5 //  License as published by the Free Software Foundation; either
6 //  version 2.1 of the License.
7 //
8 //  This library is distributed in the hope that it will be useful,
9 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
10 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 //  Lesser General Public License for more details.
12 //
13 //  You should have received a copy of the GNU Lesser General Public
14 //  License along with this library; if not, write to the Free Software
15 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 #ifndef __SIMPLEX__
20 #define __SIMPLEX__
21
22 #include <vector>
23
24 #include "solution.hxx"
25 #include "point.hxx"
26 #include "maestro.hxx"
27
28 class Simplex {
29     protected:
30         long    size, nbin, maxe, nbeval;
31         std::vector<Solution *>     simplx;
32         std::vector<Point *>        work;
33         Maestro     *calc;
34
35         Solution *add(Solution *);
36         std::vector<double> *minimum(void);
37         std::vector<double> *barycentre(void);
38
39     public :
40         Simplex(long, long, Maestro &);
41         ~Simplex(void);
42         void setStop(long);
43         void start(void);
44         int next(void);
45         void finish(void);
46         void solve(void);
47         Solution *solution(void);
48 };
49
50 #endif