English Français

Documentation / Developer's manual

Available modules

Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,   Uranie / Sampler: TImportanceSampling.h Source File
Uranie / Sampler v4.9.0
/* @license-end */
TImportanceSampling.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/>.
17
29#ifndef TImportanceSampling_H
30#define TImportanceSampling_H
31
32//ROOT
33#include "Rtypes.h"
34#include "TLeaf.h"
35#include "TMath.h"
36
37// uranie
38#include "TDataServer.h"
39#include "UExceptions.h"
40#include "TStochAttribut.h"
41#include "TSamplerStochastic.h"
42#include "TSampling.h"
43
44namespace URANIE
45{
46namespace Sampler
47{
49{
50
51public:
57 URANIE::DataServer::TDataServer * _tds_IS;
59 URANIE::DataServer::TStochasticAttribute * _x;
61 URANIE::DataServer::TStochasticAttribute * _is_x;
63 Double_t _mean;
65 Double_t _std;
67 Double_t _proba;
68
69protected:
71 Bool_t _blog;
74
76public:
81 TImportanceSampling(URANIE::DataServer::TDataServer *tds, TString xname,
82 URANIE::DataServer::TStochasticAttribute *att, Int_t ns);
86
87 //---------------------------------------------
97 URANIE::DataServer::TDataServer *getTDS()
98 {
99 return _tds_IS;
100 }
102
103 //---------------------------------------------
111 Double_t computeMean(TString u);
116 Double_t computeStd(TString u);
122 Double_t computeThreshold(TString u, Double_t dThreshold);
128 Double_t computeQuantile(TString sVar, Double_t dAlpha,
129 EQuantileMethod nMethod = kQuantile2);
130
132
133 //---------------------------------------------
137
138 void generateSample(Option_t *option = "");
140
141 //---------------------------------------------
145
148
149 //---------------------------------------------
153 void setLog()
154 {
155 _blog = kTRUE;
156 }
157 void unsetLog()
158 {
159 _blog = kFALSE;
160 }
162 {
163 _blog = _blog ? kFALSE : kTRUE;
164 }
165 Bool_t getLog()
166 {
167 return _blog;
168 }
169 virtual void printLog(Option_t *option = "");
171
172 ClassDef(URANIE::Sampler::TImportanceSampling, ID_DATASERVER)
173 //Definition of an variable
174
175};
176
177} // Fin du namespace DataServer
178} // Fin du names
179
180#endif
Creation of the abstract class TSamplerStochastic.
descritption.
Definition TImportanceSampling.h:49
void unsetLog()
Definition TImportanceSampling.h:157
virtual ~TImportanceSampling()
Destructor.
void changeLog()
Definition TImportanceSampling.h:161
void createListOfAttributes()
Creates the List of attributes to simulate.
URANIE::DataServer::TDataServer * _tds_IS
new tds build by the constructor
Definition TImportanceSampling.h:57
Bool_t getLog()
Definition TImportanceSampling.h:165
Double_t computeQuantile(TString sVar, Double_t dAlpha, EQuantileMethod nMethod=kQuantile2)
Bool_t _blog
Boolean for edit the log.
Definition TImportanceSampling.h:71
URANIE::DataServer::TStochasticAttribute * _x
attribut which be subsitute
Definition TImportanceSampling.h:59
EQuantileMethod
Definition TImportanceSampling.h:53
@ kQuantileUnknown
Definition TImportanceSampling.h:54
@ kQuantile1
Definition TImportanceSampling.h:54
@ kQuantile2
Definition TImportanceSampling.h:54
@ kQuantile3
Definition TImportanceSampling.h:54
@ kQuantile4
Definition TImportanceSampling.h:54
Double_t computeStd(TString u)
This method computes and returns the stantard deviation of the ouput attribut given in parameter.
URANIE::DataServer::TDataServer * getTDS()
This method returns the new tds build by the contructor of the object TIportanceSampling.
Definition TImportanceSampling.h:97
virtual void printLog(Option_t *option="")
Prints the log.
void generateSample(Option_t *option="")
Generates the Sample.
Double_t _std
standart deviation
Definition TImportanceSampling.h:65
TImportanceSampling(URANIE::DataServer::TDataServer *tds, TString xname, URANIE::DataServer::TStochasticAttribute *att, Int_t ns)
Constructor.
Double_t _proba
probability of threshold crossing
Definition TImportanceSampling.h:67
Double_t computeThreshold(TString u, Double_t dThreshold)
This method computes and returns the probability of threshold crossing of the ouput attribut given in...
Double_t _mean
mean
Definition TImportanceSampling.h:63
TSampling * _sampling
THe TSampling object.
Definition TImportanceSampling.h:73
void setLog()
Definition TImportanceSampling.h:153
Double_t computeMean(TString u)
This method computes the mean of the ouput attribut given in parameter.
URANIE::DataServer::TStochasticAttribute * _is_x
New law/attribut.
Definition TImportanceSampling.h:61
Definition TSamplerStochastic.h:44
Definition TSampling.h:66
Definition TAMHCopula.h:60