English Français

Documentation / Developer's manual

Available modules

Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,   Uranie / Sampler: TBasicSampling.h Source File
Uranie / Sampler v4.9.0
/* @license-end */
TBasicSampling.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
58#ifndef TBASICSAMPLING_H
59#define TBASICSAMPLING_H
60
61#ifndef ROOT_TMatrixD
62#include "TMatrixD.h"
63#endif
64#ifndef ROOT_TVectorD
65#include "TVectorD.h"
66#endif
67#ifndef ROOT_TNtuple
68#include "TNtuple.h"
69#endif
70#ifndef ROOT_TString
71#include "TString.h"
72#endif
73#ifndef ROOT_TNtupleD
74#include "TNtupleD.h"
75#endif
76#ifndef ROOT_TNamed
77#include "TNamed.h"
78#endif
79
80// Uranie
81#include "TSamplerStochastic.h"
82#include "TAttribute.h"
83#include "TStochAttribut.h"
84#include "TDataServer.h"
85#include "LHSInput.H"
86
87namespace URANIE
88{
89namespace Sampler
90{
92{
93 // Associations
94
95 // Attributes
96public:
101 LHSInput* _fLhsInput;
103 TMatrixD userCorrMat;
104 TMatrixD _corrMat;
107 Double_t _simTolerance;
109
110 // Operations
111public:
112 //---------------------------------------------
116
118
131 TBasicSampling(URANIE::DataServer::TDataServer *tds, Option_t *option =
132 "lhs", Int_t sampleSize = 1000);
133
135 virtual ~TBasicSampling();
137
138 //---------------------------------------------
142
143 void setTolerance(Double_t tolerance)
144 {
145 _simTolerance = tolerance;
146 }
147
149 void setCorrelationMatrix(TMatrixD corrMat);
150
152 void setUserCorrelation(TString attName1, TString attName2,
153 Double_t corrValue);
154
156 void findSimilar();
158
159 //---------------------------------------------
163
177 void generateCorrSample(Option_t *option="");
178
180
184 void generateSample(Option_t *option = "");
185
187 virtual void fillOtherAttributes();
189
190 //---------------------------------------------
194
198 virtual void printLog(Option_t *option = "");
200
201 ClassDef(URANIE::Sampler::TBasicSampling, ID_SAMPLER)
202 //Definition d'un plan d'exp�rience
203};
204
205} // Fin du namespace Sampler
206} // Fin du namespace URANIE
207#endif
208// fin du fichier $RCSfile$.
Creation of the abstract class TSamplerStochastic.
Description of the class TBasicSampling.
Definition TBasicSampling.h:92
virtual void printLog(Option_t *option="")
Prints the log.
Definition TBasicSampling.cxx:624
Bool_t bApplyUserCorrelation
if true, correlated data are produced.
Definition TBasicSampling.h:108
TList * _listOfFormulas
list of formulas linking two totally correlated attributes.
Definition TBasicSampling.h:106
void generateSample(Option_t *option="")
Generates the sample.
Definition TBasicSampling.cxx:501
void setCorrelationMatrix(TMatrixD corrMat)
Set the correlation matrix.
Definition TBasicSampling.cxx:203
void generateCorrSample(Option_t *option="")
Generates correlated data following a user defined correlation matrix.
Definition TBasicSampling.cxx:339
TMatrixD userCorrMat
correlation matrix defined by the user
Definition TBasicSampling.h:103
Double_t _simTolerance
precision to decide if a correlation is equal to 1.0 (or -1.0).
Definition TBasicSampling.h:107
TMatrixD _corrMat
correlation matrix used internally
Definition TBasicSampling.h:104
TList * _listOfSimilar
list of attributes totally correlated with other attributes.
Definition TBasicSampling.h:105
void setTolerance(Double_t tolerance)
Set the precision of similarity
Definition TBasicSampling.h:143
virtual ~TBasicSampling()
Default destructor.
Definition TBasicSampling.cxx:183
LHSInput * _fLhsInput
Definition TBasicSampling.h:101
virtual void fillOtherAttributes()
Fills the TAttributeFormula and totally correlated attributes.
Definition TBasicSampling.cxx:603
void setUserCorrelation(TString attName1, TString attName2, Double_t corrValue)
Set user correlation for two attributes.
Definition TBasicSampling.cxx:243
EType
Definition TBasicSampling.h:98
@ kUnknown
Definition TBasicSampling.h:99
@ kSRS
Definition TBasicSampling.h:99
@ kLHS
Definition TBasicSampling.h:99
void findSimilar()
Locate totally correlated attributes.
Definition TBasicSampling.cxx:270
EType _ntype
The type of sampling (SRS, LHS)
Definition TBasicSampling.h:102
Definition TSamplerStochastic.h:44
Definition TAMHCopula.h:60