English Français

Documentation / Manuel développeur

Modules disponibles

Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,   Uranie / Optimizer: TMultiGenAnalyticalFunction.h Source File
Uranie / Optimizer v4.9.0
/* @license-end */
TMultiGenAnalyticalFunction.h
Go to the documentation of this file.
1
2// 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
6// by 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
22// $State$
24
35#ifndef TMULTIGENANALYTICALFUNCTION_H
36#define TMULTIGENANALYTICALFUNCTION_H
37
38// ROOT
39#include "Math/IFunction.h"
40#include "TMethodCall.h"
41#include "TTreeFormula.h"
42#include "TNtupleD.h"
43
44// URANIE
45#include "Optimizer.h"
46#include "TDataServer.h"
47
48namespace URANIE
49{
50namespace Optimizer
51{
52class TMultiGenAnalyticalFunction: public ROOT::Math::IBaseFunctionMultiDim
53{
54
55public:
56 //---------------------------------------------
60
61#ifdef ROOT5
62 TMultiGenAnalyticalFunction(URANIE::DataServer::TDataServer *tds, void * fcn,
63 TString sinput, TString soutput, TString scost = "");
64#else
65 TMultiGenAnalyticalFunction(URANIE::DataServer::TDataServer *tds, void (*fcn)(Double_t*, Double_t*),
66 TString sinput, TString soutput, TString scost = "");
67#endif
69 TMultiGenAnalyticalFunction(URANIE::DataServer::TDataServer *tds, const char* fcn,
70 TString sinput, TString soutput, TString scost = "");
73
74 //---------------------------------------------
78
79 void init();
81 void clean();
83
84 //---------------------------------------------
88
90 {
91#ifdef ROOT5
94#else
95 return new TMultiGenAnalyticalFunction(_tds, _fMethodCall->GetMethodName(), _sinput,
97#endif
98 }
100 unsigned int NDim() const
101 {
102 return _ninput;
103 }
105
106 //---------------------------------------------
110
111 TMethodCall *getMethodCall() const
112 {
113 return _fMethodCall;
114 }
116
117 //---------------------------------------------
121 void setLog()
122 {
123 _blog = kTRUE;
124 }
125 void unsetLog()
126 {
127 _blog = kFALSE;
128 }
129
131 {
132 _blog = _blog ? kFALSE : kTRUE;
133 }
134 Bool_t getLog()
135 {
136 return _blog;
137 }
138
140
141
142public:
143 Double_t *getOutputValues() { return _doutputValue;}
144
145private:
146 //---------------------------------------------
150
151 double DoEval(const double * x) const;
153
154 Bool_t _blog;
156 TString _sinput;
157 double * _dinputValue;
158 double * _xin, *_codevalue;
163 TString _soutput;
164 double * _doutputValue;
165 TString _sCost;
168 URANIE::DataServer::TDataServer *_tds;
170 void (*_fMethod)(Double_t *gin, Double_t *f); // A pointer for the analytical function
171 TMethodCall *_fMethodCall;
172 TNtupleD *_informTree;
173 vector<TTreeFormula*> _vinForm;
174
176 //Classe de
177
178};
179} // Fin du namespace Optimizer
180} // Fin du namespace URANIE
181
183
184#endif
R__EXTERN URANIE::Optimizer::TMultiGenAnalyticalFunction * gTMGAF
Definition TMultiGenAnalyticalFunction.h:182
NEWMAT::ColumnVector & x
Definition TOptimizerOpt.cxx:70
Definition TMultiGenAnalyticalFunction.h:53
Bool_t getLog()
Definition TMultiGenAnalyticalFunction.h:134
TString _sWorkingDirectory
The Working directory.
Definition TMultiGenAnalyticalFunction.h:167
int * _codeindex
Definition TMultiGenAnalyticalFunction.h:159
TString _sinput
Name of the input attributes.
Definition TMultiGenAnalyticalFunction.h:156
void changeLog()
Definition TMultiGenAnalyticalFunction.h:130
double * _codevalue
Definition TMultiGenAnalyticalFunction.h:158
double * _dinputValue
Definition TMultiGenAnalyticalFunction.h:157
Int_t _nCostIndex
the current index for the selected cost in the output list of attribute
Definition TMultiGenAnalyticalFunction.h:166
TNtupleD * _informTree
Definition TMultiGenAnalyticalFunction.h:172
TMethodCall * getMethodCall() const
Return the pointer to the TmethodCall attribut.
Definition TMultiGenAnalyticalFunction.h:111
void unsetLog()
Definition TMultiGenAnalyticalFunction.h:125
vector< TTreeFormula * > _vinForm
Definition TMultiGenAnalyticalFunction.h:173
double * _doutputValue
The output attribute name.
Definition TMultiGenAnalyticalFunction.h:164
int _noutformula
Definition TMultiGenAnalyticalFunction.h:162
TMultiGenAnalyticalFunction(URANIE::DataServer::TDataServer *tds, void(*fcn)(Double_t *, Double_t *), TString sinput, TString soutput, TString scost="")
Constructor with a dataserver.
Bool_t _blog
Boolean for edit the log.
Definition TMultiGenAnalyticalFunction.h:154
TMultiGenAnalyticalFunction(URANIE::DataServer::TDataServer *tds, const char *fcn, TString sinput, TString soutput, TString scost="")
Constructor with a dataserver and function name only.
TString _soutput
Name of the output attributes.
Definition TMultiGenAnalyticalFunction.h:163
URANIE::DataServer::TDataServer * _tds
Definition TMultiGenAnalyticalFunction.h:168
TMethodCall * _fMethodCall
Pointer to MethodCall in case of interpreted function.
Definition TMultiGenAnalyticalFunction.h:171
void setLog()
Definition TMultiGenAnalyticalFunction.h:121
TString _sCost
The name of the selected cost (the number must be equal to 1)
Definition TMultiGenAnalyticalFunction.h:165
double * _xin
Definition TMultiGenAnalyticalFunction.h:158
int _ninformula
Definition TMultiGenAnalyticalFunction.h:161
void(* _fMethod)(Double_t *gin, Double_t *f)
Definition TMultiGenAnalyticalFunction.h:170
Int_t _CostInOutput
Pointeur vers un TDS.
Definition TMultiGenAnalyticalFunction.h:169
int _noutput
Definition TMultiGenAnalyticalFunction.h:160
Double_t * getOutputValues()
Definition TMultiGenAnalyticalFunction.h:143
double DoEval(const double *x) const
the DoEval method
TMultiGenAnalyticalFunction * Clone() const
The clone method.
Definition TMultiGenAnalyticalFunction.h:89
int _ninput
Definition TMultiGenAnalyticalFunction.h:155
unsigned int NDim() const
the NDIM method
Definition TMultiGenAnalyticalFunction.h:100
Rosenbrock's function (n=2) with first and second order derivatives.
Definition TBestEstimate.h:58