English Français

Documentation / Manuel développeur

Modules disponibles

Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,   Uranie / DataServer: TStochAttribut.h Source File
Uranie / DataServer v4.9.0
/* @license-end */
TStochAttribut.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
36#ifndef TSTOCHASTICATTRIBUTE_H
37#define TSTOCHASTICATTRIBUTE_H
38
39#include "TString.h"
40#include <iostream>
41
42// Uranie
43#include "DataServer.h"
44#include "TAttribute.h"
45#include "UExceptions.h"
46
47namespace URANIE
48{
49namespace DataServer
50{
51
66#define THEO_DEF -999.0123456789
67
69{
70public:
71
98
104
105protected:
106
111 Double_t _pmin;
112 Double_t _pmax;
114
115public:
116 // -----------------------------------------------------------------------
117 // Constructors
118 // -----------------------------------------------------------------------
121
123
127
129
135 TStochasticAttribute(TString str, ELawType value);
136
138
146 TStochasticAttribute(TString str, ELawType value, Double_t min,
147 Double_t max);
148
150
160
163
164 // -----------------------------------------------------------------------
165 // Getter and setter methods
166 // -----------------------------------------------------------------------
167
173
182
184
190 virtual Double_t getPDF(Double_t x) = 0;
191 double getPDFforTF1(double *x) { return getPDF(x[0]); }
192
194
203 virtual Double_t getCDF(Double_t x) = 0;
204 double getCDFforTF1(double *x) { return getCDF(x[0]); }
205
207
222 virtual Double_t getInvCDF(Double_t p) = 0;
223 double getInvCDFforTF1(double *x) { return getInvCDF(x[0]); }
224
226 virtual Double_t getTheoreticalMean();
227
229 virtual Double_t getTheoreticalStdDev();
230
232 virtual Double_t getTheoreticalMode();
233
235
236 //---------------------------------------------
240
247 {
248 _lawType = value;
249 }
250
252
271 void setLawType(TString name);
272
274 //const int getLawType() const { return _lawType;}
276 {
277 return _lawType;
278 }
279
281
296
298
308
310
339
340 //---------------------------------------------
344
345 virtual Double_t getPMin()
346 {
347 return _pmin;
348 }
350 virtual Double_t getPMax()
351 {
352 return _pmax;
353 }
355
356
358 virtual void printLog();
359
360 ClassDef(TStochasticAttribute, ID_DATASERVER)
361 //Definition of a stochastic variable
362};
363
370{
371
372 // Attributes
373protected:
374
375public:
376 // -----------------------------------------------------------------------
377 // Constructors
378 // -----------------------------------------------------------------------
381
383
387
389
395 TInfiniteDistribution(TString str, ELawType value);
396
398
408
411
412 // -----------------------------------------------------------------------
413 // Getter and setter methods
414 // -----------------------------------------------------------------------
415
420
433 virtual void setLowerBound(Double_t val);
434
436
449 virtual void setUpperBound(Double_t val);
450
452
466 virtual void setBounds(Double_t lower, Double_t upper);
468
469 virtual void printLog();ClassDef(TInfiniteDistribution, ID_DATASERVER)
470 //Definition of an stochastic variable
471};
472} // Fin du namespace DataServer
473} // Fin du namespace URANIE
474
475#endif
Interface file for the class URANIE::DataServer::TAttribute.
Description of a variable (field).
Definition TAttribute.h:138
Definition TStochAttribut.h:370
TInfiniteDistribution()
Default Constructor.
TInfiniteDistribution(TString str)
Constructor setting the name.
TInfiniteDistribution(TString str, ELawType value)
Constructor setting the name and the law type.
virtual void setUpperBound(Double_t val)
Sets the upper bound of the attribute.
virtual void setLowerBound(Double_t val)
Sets the lower bound of the attribute.
TInfiniteDistribution(TAttribute *object, ELawType value)
Construction of a TInfiniteDistribution from an existing TAttribute object.
virtual void setBounds(Double_t lower, Double_t upper)
Sets the lower and upper bounds of the attribute.
virtual void printLog()
Display information specific to this class.
virtual ~TInfiniteDistribution()
Default Destructor.
Definition TStochAttribut.h:69
Double_t _pmin
The min value of cumulative density function.
Definition TStochAttribut.h:111
TStochasticAttribute(TAttribute *object, ELawType value)
Construction of a TStochasticAttribute from an existing TAttribute object.
int getLawType()
Returns the law type as an integer.
Definition TStochAttribut.h:275
double getCDFforTF1(double *x)
Definition TStochAttribut.h:204
EStochasticBasis getStochasticBasis() const
Returns the orthogonal polynomial which is used to represent the attribute.
Definition TStochAttribut.h:334
TStochasticAttribute(TString str)
Constructor setting the name.
virtual ~TStochasticAttribute()
Default Destructor.
virtual Double_t getTheoreticalMean()
Returns the theoretical value of the mean.
Double_t _pmax
The max value of cumulative density function.
Definition TStochAttribut.h:112
Double_t _dtheoreticalMode
The theoretical mode.
Definition TStochAttribut.h:110
virtual Double_t getPDF(Double_t x)=0
Returns the probability density for the value x.
virtual void printLog()
Display information specific to this class.
TStochasticAttribute(TString str, ELawType value, Double_t min, Double_t max)
Constructor setting the name, the law type, and the range (lower and upper bounds)
virtual Double_t getInvCDF(Double_t p)=0
Returns the value corresponding to the cumulative density p.
Double_t _dtheoreticalMean
The theoretical mean.
Definition TStochAttribut.h:108
virtual Double_t getCDF(Double_t x)=0
Returns the cumulative distribution for the value x.
ELawType
The list of laws that a TStochasticAttribute can follow.
Definition TStochAttribut.h:74
@ kLogUniform
Definition TStochAttribut.h:76
@ kTrapezium
Definition TStochAttribut.h:80
@ kGumbel
Definition TStochAttribut.h:90
@ kNormal
Definition TStochAttribut.h:77
@ kUniform
Definition TStochAttribut.h:75
@ kTriangular
Definition TStochAttribut.h:81
@ kStudent
Definition TStochAttribut.h:78
@ kCompose
Definition TStochAttribut.h:95
@ kUnknown
Definition TStochAttribut.h:96
@ kUniformByParts
Definition TStochAttribut.h:88
@ kGamma
Definition TStochAttribut.h:85
@ kCauchy
Definition TStochAttribut.h:87
@ kExponential
Definition TStochAttribut.h:83
@ kInvGamma
Definition TStochAttribut.h:86
@ kWeibull
Definition TStochAttribut.h:89
@ kGeneralizedNormalV2
Definition TStochAttribut.h:94
@ kBeta
Definition TStochAttribut.h:84
@ kLogTriangular
Definition TStochAttribut.h:82
@ kGenPareto
Definition TStochAttribut.h:92
@ kGeneralizedNormal
Definition TStochAttribut.h:93
@ kLogNormal
Definition TStochAttribut.h:79
@ kMultinomial
Definition TStochAttribut.h:91
void setStochasticBasis(EStochasticBasis n)
Defines an orthogonal polynomial family to represent the stochastic attribute.
Definition TStochAttribut.h:292
EStochasticBasis
The list of orthogonal polynomial families that can represent a given TStochasticAttribute.
Definition TStochAttribut.h:101
@ kHermite
Definition TStochAttribut.h:102
@ kLegendre
Definition TStochAttribut.h:102
@ kJacobi
Definition TStochAttribut.h:102
@ kLaguerre
Definition TStochAttribut.h:102
@ kUnknownBasis
Definition TStochAttribut.h:102
EStochasticBasis _nStochasticBasis
The stochastic representation of an orthogonal basis.
Definition TStochAttribut.h:113
void setDefaultStochasticBasis()
Sets the default orthogonal polynomial family representing the stochastic attribute.
virtual Double_t getTheoreticalMode()
Returns the theoretical value of the mode.
Double_t _dtheoreticalStdDev
The theoretical standard deviation.
Definition TStochAttribut.h:109
void setLawType(ELawType value)
Sets the law type from an integer value.
Definition TStochAttribut.h:246
virtual Double_t getPMin()
Returns the minimum value of the cumulative distribution function.
Definition TStochAttribut.h:345
void setLawType(TString name)
Sets the law type from a law name.
TStochasticAttribute()
Default Constructor.
virtual Double_t getTheoreticalStdDev()
Returns the theoretical value of the standard deviation.
virtual void computeTheoreticalInformation()=0
Computes the theoretical values of various statistical measures, like mean, standard deviation,...
double getInvCDFforTF1(double *x)
Definition TStochAttribut.h:223
virtual Double_t getPMax()
Returns the maximum value of the cumulative distribution function.
Definition TStochAttribut.h:350
ELawType _lawType
The law type ELawType.
Definition TStochAttribut.h:107
double getPDFforTF1(double *x)
Definition TStochAttribut.h:191
TStochasticAttribute(TString str, ELawType value)
Constructor setting the name and the law type.
ROOT.
Definition TAttribute.h:106