English Français

Documentation / Developer's manual

Available modules

Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,   Uranie / Sampler: TMaxiMinLHS.h Source File
Uranie / Sampler v4.9.0
/* @license-end */
TMaxiMinLHS.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
45#ifndef TMAXIMINLHS_H
46#define TMAXIMINLHS_H
47
48#ifndef ROOT_TMatrixD
49#include "TMatrixD.h"
50#endif
51#ifndef ROOT_TVectorD
52#include "TVectorD.h"
53#endif
54#ifndef ROOT_TNtuple
55#include "TNtuple.h"
56#endif
57#ifndef ROOT_TString
58#include "TString.h"
59#endif
60#ifndef ROOT_TNtupleD
61#include "TNtupleD.h"
62#endif
63#ifndef ROOT_TNamed
64#include "TNamed.h"
65#endif
66
67// Uranie
68#include "TSamplerStochastic.h"
69#include "TSampling.h"
70#include "TAttribute.h"
71#include "TStochAttribut.h"
72#include "TDataServer.h"
73
74namespace URANIE
75{
76namespace Sampler
77{
79{
80 // Associations
81
82 // Attributes
83public:
86 double _SAinitTemp;
87 double _SACoeff;
88 unsigned int _SAN;
89 unsigned int _SAinnerN;
91
94
97 unsigned int _ns, _nx;
98 double *_vi, *_vj;
100 // Operations
101public:
102 //---------------------------------------------
106
120 TMaxiMinLHS(URANIE::DataServer::TDataServer *tds, int sampleSize, double sainitTemp, double saCoeff, int saN, int sainnerN);
121
123 virtual ~TMaxiMinLHS();
125
126 //---------------------------------------------
130
135 void generateSample(Option_t *option = "");
136
138 void setSeed(Int_t ind = 0);
139
141
146 void transformMatrix(TMatrixD &RefMat, bool toProbaSpace);
147
149 virtual void fillOtherAttributes();
151
152
153 //---------------------------------------------
157
163 static Double_t getMinDist(const TMatrixD &lhs);
164
166
172 static void getDistMatrix(TMatrixD& Dist, const TMatrixD &lhs);
173
175
180 Double_t getLPNorm(const TMatrixD &Dist_);
181
183
188 Double_t getUpdatedLPNorm(Double_t LP_norm_, unsigned int nrowRand1_, unsigned int nrowRand2_);
189
191
197 TMatrixD maximinSA_LHS(const TMatrixD &lhs);
198
200
208 void setSAProperties(double &sainitTemp, double &saCoeff, int &saN, int &sainnerN);
209
211
217 void Permutation(unsigned int & ncolRand, unsigned int & nrowRand1, unsigned int & nrowRand2);
219
220 //---------------------------------------------
224
228 virtual void printLog(Option_t *option = "");
231
232 ClassDef(URANIE::Sampler::TMaxiMinLHS, ID_SAMPLER)
233 //Definition d'un plan d'exp�rience
234};
235
236} // Fin du namespace Sampler
237} // Fin du namespace URANIE
238#endif
239// fin du fichier $RCSfile$.
Creation of the abstract class TSamplerStochastic.
descritption.
Description of the class TMaxiMinLHS.
Definition TMaxiMinLHS.h:79
void setSeed(Int_t ind=0)
Set the random generator seed.
TMatrixD _varyingDist
Definition TMaxiMinLHS.h:95
TMatrixD _currentLHS
Definition TMaxiMinLHS.h:95
void transformMatrix(TMatrixD &RefMat, bool toProbaSpace)
transform the sample
TMaxiMinLHS(URANIE::DataServer::TDataServer *tds, int sampleSize, double sainitTemp, double saCoeff, int saN, int sainnerN)
Creates a TMaxiMinLHS object from a TDataServer, definig the SA properties
void generateSample(Option_t *option="")
Generates the sample.
virtual void fillOtherAttributes()
Fills the TAttributeFormula and totally correlated attributes.
TMatrixD _varyingLHS
Definition TMaxiMinLHS.h:95
unsigned int _nx
Local counter for number of samples and variables.
Definition TMaxiMinLHS.h:97
double * _vj
arrays used throughout many calculations
Definition TMaxiMinLHS.h:98
static void getDistMatrix(TMatrixD &Dist, const TMatrixD &lhs)
Compute the distance matrix.
TMatrixD _fp
Definition TMaxiMinLHS.h:95
Double_t getUpdatedLPNorm(Double_t LP_norm_, unsigned int nrowRand1_, unsigned int nrowRand2_)
update the Lp norm
TMatrixD maximinSA_LHS(const TMatrixD &lhs)
Generate the new LHS.
unsigned int _SAinnerN
Inner Number of iteration before changing the temperature of the simulated Annealing algorithm for ma...
Definition TMaxiMinLHS.h:89
virtual void printLog(Option_t *option="")
Prints the log.
unsigned int _ns
Definition TMaxiMinLHS.h:97
Double_t getLPNorm(const TMatrixD &Dist_)
Compute the Lp norm.
static Double_t getMinDist(const TMatrixD &lhs)
Compute the minimal distance between points.
void Permutation(unsigned int &ncolRand, unsigned int &nrowRand1, unsigned int &nrowRand2)
Permute the content of the lhs plan.
double _SACoeff
Temperature coefficient of the simulated Annealing algorithm for maximin lhs.
Definition TMaxiMinLHS.h:87
TMatrixD _currentDist
Definition TMaxiMinLHS.h:95
double _SAinitTemp
Initial temperature of the simulated Annealing algorithm for maximin lhs.
Definition TMaxiMinLHS.h:86
double * _vi
Definition TMaxiMinLHS.h:98
TSampling * _sampling
Pointer to a TSampling object if tds is empty;.
Definition TMaxiMinLHS.h:96
bool _bAlreadyFilled
If the tree is already filled.
Definition TMaxiMinLHS.h:93
void createTuple()
Creates the TDSNtupleD of data with only the TStochasticAttributes.
virtual ~TMaxiMinLHS()
Default destructor.
void setSAProperties(double &sainitTemp, double &saCoeff, int &saN, int &sainnerN)
Set the Simulated Annealing algorithm properties.
unsigned int _SAN
Number of iteration the simulated Annealing algorithm for maximin lhs.
Definition TMaxiMinLHS.h:88
Definition TSamplerStochastic.h:44
Definition TSampling.h:66
Definition TAMHCopula.h:60