English Français

Documentation / Developer's manual

Available modules

Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,   Uranie / ReOptimizer: TOptimFit.h Source File
Uranie / ReOptimizer  v4.10.0
/* @license-end */
TOptimFit.h
Go to the documentation of this file.
1 // Copyright (C) 2013-2024 CEA/DES
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Lesser General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or any
7 // later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Lesser General Public License for more details.
13 //
14 // You should have received a copy of the GNU Lesser General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
18 // $Id$
19 // $Author$
20 // $Date$
21 // $Revision 1.2 $
22 // $State$
24 
32 #ifndef __VIZIRFIT__
33 #define __VIZIRFIT__
34 
35 //ROOT
36 #include "Rtypes.h"
37 #include "TNamed.h"
38 
39 // Uranie
40 #include "Reoptimizer.h"
41 
42 namespace URANIE
43 {
44 namespace Reoptimizer
45 {
46 
47 class TOptimFit: public TObject
48 {
49 public:
50  virtual double operator()(double) = 0;
51  virtual double operator()(int, double, double*, double*) = 0;
52 
53  ClassDef(URANIE::Reoptimizer::TOptimFit, ID_REOPTIMIZER)
54 };
55 
56 class TMaximizeFit: public TOptimFit
57 {
58 public:
60  {
61  }
62  virtual ~TMaximizeFit()
63  {
64  }
65 
66  virtual double operator()(double in)
67  {
68  return -in;
69  }
70  virtual double operator()(int, double, double*, double*);
71 
72  ClassDef(URANIE::Reoptimizer::TMaximizeFit, ID_REOPTIMIZER)
73 };
74 
75 class TTargetFit: public TOptimFit
76 {
77 protected:
78  double _ref;
79 
80 public:
81  TTargetFit(double val)
82  {
83  _ref = val;
84  }
85  virtual ~TTargetFit()
86  {
87  }
88 
89  virtual double operator()(double in);
90  virtual double operator()(int, double, double*, double*);
91 
92  ClassDef(URANIE::Reoptimizer::TTargetFit, ID_REOPTIMIZER)
93 };
94 
95 class TLesserFit: public TOptimFit
96 {
97 protected:
98  double _ref;
99 
100 public:
101  TLesserFit(double val)
102  {
103  _ref = val;
104  }
105  virtual ~TLesserFit()
106  {
107  }
108 
109  virtual double operator()(double in)
110  {
111  return in - _ref;
112  }
113  virtual double operator()(int, double, double*, double*);
114 
115  ClassDef(URANIE::Reoptimizer::TLesserFit, ID_REOPTIMIZER)
116 };
117 
119 {
120 protected:
121  double _ref;
122 
123 public:
124  TGreaterFit(double val)
125  {
126  _ref = val;
127  }
128  virtual ~TGreaterFit()
129  {
130  }
131 
132  virtual double operator()(double in)
133  {
134  return _ref - in;
135  }
136  virtual double operator()(int, double, double*, double*);
137 
138  ClassDef(URANIE::Reoptimizer::TGreaterFit, ID_REOPTIMIZER)
139 };
140 
141 class TInsideFit: public TOptimFit
142 {
143 protected:
144  double _low, _top;
145 
146 public:
147  TInsideFit(double, double);
148  virtual ~TInsideFit()
149  {
150  }
151 
152  virtual double operator()(double in);
153  virtual double operator()(int, double, double*, double*);
154 
155  ClassDef(URANIE::Reoptimizer::TInsideFit, ID_REOPTIMIZER)
156 };
157 
158 extern TMaximizeFit kMaximizeFit;
159 
160 }
161 } //namespace
162 
163 #endif
164 
TGreaterFit(double val)
Definition: TOptimFit.h:124
Definition: TCMAES.h:66
virtual double operator()(double in)
Definition: TOptimFit.h:66
Definition: TOptimFit.h:118
double _ref
Definition: TOptimFit.h:98
double _low
Definition: TOptimFit.h:144
virtual double operator()(double in)
Definition: TOptimFit.h:132
Definition: TOptimFit.h:75
virtual double operator()(double in)
Definition: TOptimFit.cxx:58
virtual ~TInsideFit()
Definition: TOptimFit.h:148
Definition: TOptimFit.h:47
virtual ~TLesserFit()
Definition: TOptimFit.h:105
double _ref
Definition: TOptimFit.h:121
TInsideFit(double, double)
Definition: TOptimFit.cxx:91
TTargetFit(double val)
Definition: TOptimFit.h:81
virtual double operator()(double in)
Definition: TOptimFit.h:109
virtual ~TMaximizeFit()
Definition: TOptimFit.h:62
TLesserFit(double val)
Definition: TOptimFit.h:101
Definition: TOptimFit.h:95
virtual ~TGreaterFit()
Definition: TOptimFit.h:128
double _top
Definition: TOptimFit.h:144
Definition: TOptimFit.h:141
virtual double operator()(double)=0
TMaximizeFit kMaximizeFit
double _ref
Definition: TOptimFit.h:78
virtual double operator()(double in)
Definition: TOptimFit.cxx:96
Definition: TOptimFit.h:56
TMaximizeFit()
Definition: TOptimFit.h:59
virtual ~TTargetFit()
Definition: TOptimFit.h:85