English Français

Documentation / Developer's manual

Available modules

Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,   Uranie / Sampler: TGaussianSampling.h Source File
Uranie / Sampler v4.9.0
/* @license-end */
TGaussianSampling.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
52#ifndef TGAUSSIANSAMPLING_H
53#define TGAUSSIANSAMPLING_H
54
55#ifndef ROOT_TMatrixD
56#include "TMatrixD.h"
57#endif
58#ifndef ROOT_TVectorD
59#include "TVectorD.h"
60#endif
61#ifndef ROOT_TNtuple
62#include "TNtuple.h"
63#endif
64#ifndef ROOT_TString
65#include "TString.h"
66#endif
67#ifndef ROOT_TNtupleD
68#include "TNtupleD.h"
69#endif
70#ifndef ROOT_TNamed
71#include "TNamed.h"
72#endif
73
74// Uranie
75#include "TSamplerStochastic.h"
76#include "TAttribute.h"
77#include "TStochAttribut.h"
78#include "TDataServer.h"
79
80namespace URANIE
81{
82namespace Sampler
83{
85{
86 // Associations
87
88 // Attributes
89public:
90 enum EType
91 {
93 };
94 TMatrixD _corrmatrix;
95 TMatrixD _covmatrix;
97
98 // Operations
99private:
100 void splitMatrixVarCoVar(TMatrixD matVarCovar, TVectorD vecOfUnit,
101 TMatrixD &matVarCovar0, TMatrixD &matVarCovar1, TMatrixD &matVarCovar01);
102
103 void generatenStandardPoints(TMatrixD &matPoints);
106
107public:
108 //---------------------------------------------
112
118 TGaussianSampling(URANIE::DataServer::TDataServer *tds, Option_t *option =
119 "lhs", Int_t nCalcul = 100);
120
124
125 //---------------------------------------------
131
132 virtual void init();
134 virtual void terminate();
136
137 //---------------------------------------------
139
140 void generateSample(Option_t *option = "");
141
142 void generateConditionalSample(TVectorD vecOf01, Int_t no, Int_t ni);
143
144 void setIteratorNameNo(TString sNameNo) {
145 _sIteratorNameNo = sNameNo.Data();
146 }
147
148 void setIteratorNameNi(TString sNameNi) {
149 _sIteratorNameNi = sNameNi.Data();
150 }
151
152 const char * getIteratorNameNo() {
153 return _sIteratorNameNo.Data();
154 }
155 const char * getIteratorNameNi() {
156 return _sIteratorNameNi.Data();
157 }
159
160 //---------------------------------------------
165
173 void setUserCorrelation(Int_t indx, Int_t indy, double value);
174 void setUserVarianceCovarianceMatrix(Int_t indx, Int_t indy, double value);
175
177
182 void setUserCorrelation(TString xname, TString yname, double value);
183
185
190 void setUserCorrelation(URANIE::DataServer::TAttribute *x,
191 URANIE::DataServer::TAttribute *y, Double_t value);
192
194
210 void setFixedSumCovariance(TString method = "simple");
211
214 {
215 return _corrmatrix;
216 }
217
220 {
221 return _covmatrix;
222 }
224
225 //---------------------------------------------
229
230 virtual void printLog(Option_t *option = "");
232
233 ClassDef(URANIE::Sampler::TGaussianSampling, ID_SAMPLER)
234 //Definition d'un plan d'experience
235};
236
237} // Fin du namespace Sampler
238} // Fin du namespace URANIE
239#endif
240// fin du fichier $RCSfile$.
Creation of the abstract class TSamplerStochastic.
Description of the class TGaussianSampling.
Definition TGaussianSampling.h:85
TGaussianSampling(URANIE::DataServer::TDataServer *tds, Option_t *option="lhs", Int_t nCalcul=100)
Constructor from a TDataServer, the name of the method and the size of the sample.
const char * getIteratorNameNi()
Definition TGaussianSampling.h:155
virtual void printLog(Option_t *option="")
Prints the log.
TMatrixD _corrmatrix
Definition TGaussianSampling.h:94
void setUserCorrelation(Int_t indx, Int_t indy, double value)
Defines a correlation between two attributes given by their indexes.
void setUserCorrelation(URANIE::DataServer::TAttribute *x, URANIE::DataServer::TAttribute *y, Double_t value)
Defines a correlation between two attributes.
TString _sIteratorNameNi
The specific iterator attribute for NI integer.
Definition TGaussianSampling.h:105
void generatenStandardPoints(TMatrixD &matPoints)
void generateConditionalSample(TVectorD vecOf01, Int_t no, Int_t ni)
TMatrixD getCorrelationMatrix()
Retrieve the correlation matrix.
Definition TGaussianSampling.h:213
void setIteratorNameNo(TString sNameNo)
Definition TGaussianSampling.h:144
void setFixedSumCovariance(TString method="simple")
Defines a special covariance matrix.
void setUserVarianceCovarianceMatrix(Int_t indx, Int_t indy, double value)
void splitMatrixVarCoVar(TMatrixD matVarCovar, TVectorD vecOfUnit, TMatrixD &matVarCovar0, TMatrixD &matVarCovar1, TMatrixD &matVarCovar01)
The type of sampling (SRS, LHS)
void setIteratorNameNi(TString sNameNi)
Definition TGaussianSampling.h:148
const char * getIteratorNameNo()
Definition TGaussianSampling.h:152
virtual void terminate()
The post-processing step.
EType
Definition TGaussianSampling.h:91
@ kUnknown
Definition TGaussianSampling.h:92
@ kSRS
Definition TGaussianSampling.h:92
@ kLHS
Definition TGaussianSampling.h:92
TMatrixD getCovarianceMatrix()
Retrieve the covariance matrix.
Definition TGaussianSampling.h:219
void generateSample(Option_t *option="")
Generates the sample.
TString _sIteratorNameNo
The specific iterator attribute for NO integer.
Definition TGaussianSampling.h:104
void setUserCorrelation(TString xname, TString yname, double value)
Defines a correlation between two attributes given by their names.
virtual ~TGaussianSampling()
Default destructor.
TMatrixD _covmatrix
The correlation matrix.
Definition TGaussianSampling.h:95
EType _ntype
The covariance matrix.
Definition TGaussianSampling.h:96
virtual void init()
The preprocessing step.
Definition TSamplerStochastic.h:44
Definition TAMHCopula.h:60