English Français

Documentation / Developer's manual

Available modules

Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,   Uranie / Sampler: TOATDesign.h Source File
Uranie / Sampler v4.9.0
/* @license-end */
TOATDesign.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
34#ifndef TOATDesign_H
35#define TOATDesign_H
134#include <iostream>
135#include <map>
136
137#include "TSamplerStochastic.h"
138#include "TSequence.h"
139#include "TMap.h"
140
141#define dStepPrecision 1.0e-16
142
143namespace URANIE
144{
145namespace Sampler
146{
148{
149
150 // Attributes
151private:
152 TString _sMode;
153 TString _sGenMode;
154 Int_t _nNbModif;
157 URANIE::DataServer::TDSNtupleD* _nominalValueTuple;
158 Bool_t _bHasData;
160
161 // Operations
162protected:
163 //---------------------------------------------
172
182 virtual void init();
183
185 virtual void terminate()
186 {
187 }
189public:
190 //---------------------------------------------
194
212 TOATDesign(URANIE::DataServer::TDataServer *tds, TString mode = "regular",
213 Int_t number = 2);
214
216 virtual ~TOATDesign();
218
219 //---------------------------------------------
223
224 virtual Bool_t getHasData()
225 {
226 return _bHasData;
227 }
228
230 virtual Double_t getNumberOfModifications()
231 {
232 return _nNbModif;
233 }
234
236 virtual TString getSamplingMode()
237 {
238 return _sMode;
239 }
240
242 virtual TString getGenerationMode()
243 {
244 return _sGenMode;
245 }
246
248 virtual TList* getChangingAttList()
249 {
250 return &_changingAttList;
251 }
252
254 virtual TMap* getRangeInformation()
255 {
256 return &_infoRangeMap;
257 }
258
260 virtual URANIE::DataServer::TDSNtupleD* getNominalValueTuple()
261 {
262 return _nominalValueTuple;
263 }
264
266
281 virtual void setOption(TString mode, Int_t number);
282
287 Double_t getStepPrecision() {
288 return _dStepPrecision;
289 }
294 void setStepPrecision(Double_t dval) {
295 _dStepPrecision = TMath::Max(0.0, dval);
296 }
297
298
300
323 void setRange(TString changingAttName, Double_t rangeValue,
324 Bool_t is_percent = kFALSE);
325
327
350 void setRange(TString changingAttName, TString rangeAttName,
351 Bool_t is_percent = kFALSE);
353
354 //---------------------------------------------
358
363 virtual void generateSample(Option_t *option = "");
365
366 //---------------------------------------------
370
374 virtual void printLog(Option_t *option = "");
376
377 ClassDef(URANIE::Sampler::TOATDesign, ID_SAMPLER)
378};
379} // Fin du namespace Sampler
380} // Fin du namespace URANIE
381
382#endif
383// fin du fichier $RCSfile$.
Creation of the abstract class TSamplerStochastic.
This class creates a "One factor At a Time" design of experiment. It has been developped mainly for f...
Definition TOATDesign.h:148
void setStepPrecision(Double_t dval)
Set the value of the machine precision (default value is dStepPrecision 1.0e-16)
Definition TOATDesign.h:294
Bool_t _bHasData
Boolean value set to TRUE if the data server _tds contains data.
Definition TOATDesign.h:158
Int_t _nNbModif
Number of modification for each nominal value of each changing attribute.
Definition TOATDesign.h:154
virtual URANIE::DataServer::TDSNtupleD * getNominalValueTuple()
Get the tuple storing the nominal values of the attributes.
Definition TOATDesign.h:260
virtual void printLog(Option_t *option="")
Prints the log.
virtual TString getGenerationMode()
Get random generation method.
Definition TOATDesign.h:242
void setRange(TString changingAttName, Double_t rangeValue, Bool_t is_percent=kFALSE)
Set the range of the sampling for a changing attribute.
TList _changingAttList
List of changing attributes.
Definition TOATDesign.h:155
virtual TMap * getRangeInformation()
Get the list mapping the names of the changing attributes and their corresponding range information.
Definition TOATDesign.h:254
virtual ~TOATDesign()
Default destructor.
TMap _infoRangeMap
A list mapping the names of the changing attributes and their corresponding range information.
Definition TOATDesign.h:156
virtual void terminate()
The post-processing step. Nothing is done.
Definition TOATDesign.h:185
virtual Bool_t getHasData()
Returns TRUE if the internal data server contains data.
Definition TOATDesign.h:224
virtual TString getSamplingMode()
Get OAT sampling mode.
Definition TOATDesign.h:236
virtual void setOption(TString mode, Int_t number)
Set the sampling mode and number of modifications.
virtual TList * getChangingAttList()
Get the list of changing attributes.
Definition TOATDesign.h:248
TString _sMode
Sampling mode. So far, can be "random" or "regular".
Definition TOATDesign.h:152
virtual void generateSample(Option_t *option="")
Generates the sample.
URANIE::DataServer::TDSNtupleD * _nominalValueTuple
A tuple storing the nominal values of the attributes.
Definition TOATDesign.h:157
virtual Double_t getNumberOfModifications()
Get the number of modifications per attribute and nominal values.
Definition TOATDesign.h:230
TOATDesign(URANIE::DataServer::TDataServer *tds, TString mode="regular", Int_t number=2)
Constructor of the OAT sampler.
void setRange(TString changingAttName, TString rangeAttName, Bool_t is_percent=kFALSE)
Set the name of the attribute holding the range of the sampling for a changing attribute.
Double_t _dStepPrecision
machine precesion to detect 0.0
Definition TOATDesign.h:159
Double_t getStepPrecision()
Get the value of the machine precision.
Definition TOATDesign.h:287
virtual void init()
Initialise the sampling procedure.
TString _sGenMode
Data generation mode. Only used in the random mode context, can be "lhs", or "srs".
Definition TOATDesign.h:153
Definition TSamplerStochastic.h:44
Definition TAMHCopula.h:60