Documentation / Developer's manual
Available modules
Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,  
Uranie / Sampler v4.9.0
|
#include <TSampling.h>
Public Types | |
enum | EType { kLHS , kSRS , kUnknown } |
Public Member Functions | |
Constructor and Destructor | |
TSampling (URANIE::DataServer::TDataServer *tds, Option_t *option="lhs", Int_t nCalcul=1000) | |
Constructor from a TDataServer, the name of the method and the size of the sample. | |
virtual | ~TSampling () |
Default destructor. | |
Generate the sample | |
We have several methods which can generate the sampler.
| |
void | generateSample (Option_t *option="") |
Generates the sample. | |
void | generateSampleByDakota () |
Generates the sample by the Dakota module. | |
Correlation matrix | |
Methods to specify correlation between attributes | |
void | setUserCorrelation (Int_t indx, Int_t indy, double value) |
Defines a correlation between two attributes given by their indexes. | |
void | setUserCorrelation (TString xname, TString yname, double value) |
Defines a correlation between two attributes given by their names. | |
void | setUserCorrelation (URANIE::DataServer::TAttribute *x, URANIE::DataServer::TAttribute *y, Double_t value) |
Defines a correlation between two attributes. | |
void | setCorrelationMatrix (TMatrixD corrMat) |
Set the correlation matrix. | |
void | setSaveRang (Int_t rang=0) |
EMPTY:: TSampling::setSaveRang. | |
void | setTypeSampling (Option_t *option) |
Printing Log | |
virtual void | printLog (Option_t *option="") |
Prints the log. | |
Public Member Functions inherited from URANIE::Sampler::TSamplerStochastic | |
TSamplerStochastic (URANIE::DataServer::TDataServer *tds, Option_t *option, Int_t nCalcul) | |
Constructor with a dataserver. | |
virtual | ~TSamplerStochastic () |
Default destructor. | |
void | setSeed (Int_t ind=0) |
Init the seed. | |
Int_t | getSeed () |
Returns the seed value. | |
Public Member Functions inherited from URANIE::Sampler::TSampler | |
TSampler (URANIE::DataServer::TDataServer *tds, Option_t *option, Int_t nCalcul) | |
Constructor with a TDataServer, the options and the size of the sample. | |
virtual | ~TSampler () |
Default destructor. | |
Int_t | GetID () |
Returns the ID of the class. | |
void | setMethodName (TString str) |
Sets the method name in a global variable. | |
TString | getMethodName () |
Gets the method name. | |
virtual URANIE::DataServer::TDataServer * | getTDS () |
Return the TDS filling by the sampling algorithm. | |
void | parseOption (Option_t *option) |
Parse the option. | |
virtual void | createListOfAttributes () |
Creates the List of attributes to simulate. | |
virtual void | createTuple () |
Creates the TDSNtupleD of data with only the TStochasticAttributes. | |
URANIE::DataServer::TDSNtupleD * | getTuple () |
Returns the TDSNtupleD of data. | |
virtual void | fillOtherAttributes () |
Fills the TDSNtupleD of data with other TFormulaAttributes. | |
void | setLog () |
void | unsetLog () |
void | changeLog () |
Bool_t | getLog () |
Public Attributes | |
LHSInput * | _fLhsInput |
TMatrixD | _corrmatrix |
The correlation matrix. | |
TMatrixD | _corrIndexPosition |
The permutation for giving the rank correlation matrix given by the user. | |
EType | _ntype |
The type of sampling (SRS, LHS) | |
bool | _buseSVD |
useSVD instead of Cholesky to factorize the input correlation matrix | |
bool | _buseSVDquiet |
useSVD instead of Cholesky to factorize the input correlation matrix | |
Public Attributes inherited from URANIE::Sampler::TSampler | |
Int_t | _nS |
The size of the sample. | |
Int_t | _nX |
The size of attributes to sample. | |
URANIE::DataServer::TDSNtupleD * | _ntsample |
the tntuple of data | |
TString | _sMethod |
The title of the sampler method. | |
Bool_t | _blog |
Log Printing. | |
Bool_t | _bupdateFile |
Update the back up file when generating the attributeformula if there is some. | |
URANIE::DataServer::TDataServer * | _tds |
Pointer to a TDS. | |
TList * | _lstOfAttributesToSample |
The list of Stochastic Attributes to sample. | |
Private Member Functions | |
private methods | |
void | CorrelationFactorization () |
Decomposes the correlation matrix. | |
void | computeCorrelationMatrix (TMatrixD matOrg) |
Computes the correlation matrix for a TMatrixD. | |
Additional Inherited Members | |
Protected Member Functions inherited from URANIE::Sampler::TSamplerStochastic | |
virtual void | init () |
The preprocessing step. | |
virtual void | terminate () |
The post-processing step. | |
Protected Attributes inherited from URANIE::Sampler::TSamplerStochastic | |
Int_t | _nSeed |
Member Enumeration Documentation
◆ EType
Constructor & Destructor Documentation
◆ TSampling()
URANIE::Sampler::TSampling::TSampling | ( | URANIE::DataServer::TDataServer * | tds, |
Option_t * | option = "lhs" , |
||
Int_t | nCalcul = 1000 |
||
) |
Constructor from a TDataServer, the name of the method and the size of the sample.
Attributes to sample are specified in the TDataServer. The name of the method is "lhs"|"srs". The size is an integer greater than zero.
- Default values
- Method ="lhs" with default value or when the option is uncorrect
- size = 100 with default value.
- Parameters
-
tds (TDataServer *) the pointer of the TDataServer. It must contains objects from daughter classes of TStochasticAttribute option (Option_t *) Method of sampling [lhs] nCalcul (Int_t) Size of the sampler to generate [1000]
Referenced by ClassImp().
◆ ~TSampling()
|
virtual |
Default destructor.
Referenced by ClassImp().
Member Function Documentation
◆ computeCorrelationMatrix()
|
private |
Computes the correlation matrix for a TMatrixD.
Referenced by ClassImp().
◆ CorrelationFactorization()
|
private |
◆ generateSample()
|
virtual |
Generates the sample.
Uses the Devroye algorithm to create permutation
Implements URANIE::Sampler::TSampler.
Referenced by ClassImp(), ClassImp(), ClassImp(), and ClassImp().
◆ generateSampleByDakota()
void URANIE::Sampler::TSampling::generateSampleByDakota | ( | ) |
Generates the sample by the Dakota module.
The size of sample is limited to 9990.
Referenced by ClassImp().
◆ printLog()
|
virtual |
◆ setCorrelationMatrix()
void URANIE::Sampler::TSampling::setCorrelationMatrix | ( | TMatrixD | corrMat | ) |
Set the correlation matrix.
The correlation matrix is define from a provided matrix.
- Parameters
-
the input correlation matrix requested by the user.
Referenced by ClassImp().
◆ setSaveRang()
void URANIE::Sampler::TSampling::setSaveRang | ( | Int_t | rang = 0 | ) |
EMPTY:: TSampling::setSaveRang.
Documentation of the function setSaveRang.
- Parameters
-
rang (Int_t) (default = 0)
Referenced by ClassImp().
◆ setTypeSampling()
void URANIE::Sampler::TSampling::setTypeSampling | ( | Option_t * | option | ) |
Referenced by ClassImp().
◆ setUserCorrelation() [1/3]
void URANIE::Sampler::TSampling::setUserCorrelation | ( | Int_t | indx, |
Int_t | indy, | ||
double | value | ||
) |
Defines a correlation between two attributes given by their indexes.
- Warning
- The indexes begin 0 to n-1.
- Parameters
-
indx (Int_t) the index of the first attribute indy (Int_t) the index of the second attribute value (Double_t) the correlation factor between the two attributes
Referenced by ClassImp().
◆ setUserCorrelation() [2/3]
void URANIE::Sampler::TSampling::setUserCorrelation | ( | TString | xname, |
TString | yname, | ||
double | value | ||
) |
Defines a correlation between two attributes given by their names.
- Parameters
-
xname (TString) the first attribute yname (TString) the second attribute value (Double_t) the correlation factor between x and y
◆ setUserCorrelation() [3/3]
void URANIE::Sampler::TSampling::setUserCorrelation | ( | URANIE::DataServer::TAttribute * | x, |
URANIE::DataServer::TAttribute * | y, | ||
Double_t | value | ||
) |
Defines a correlation between two attributes.
The correlation factor is define as the
- Parameters
-
x (URANIE::DataServer::TAttribute *) the first attribute y (URANIE::DataServer::TAttribute *) the second attribute value (Double_t) the correlation factor between x and y
Member Data Documentation
◆ _buseSVD
bool URANIE::Sampler::TSampling::_buseSVD |
useSVD instead of Cholesky to factorize the input correlation matrix
Referenced by ClassImp().
◆ _buseSVDquiet
bool URANIE::Sampler::TSampling::_buseSVDquiet |
useSVD instead of Cholesky to factorize the input correlation matrix
Referenced by ClassImp().
◆ _corrIndexPosition
TMatrixD URANIE::Sampler::TSampling::_corrIndexPosition |
The permutation for giving the rank correlation matrix given by the user.
Referenced by ClassImp().
◆ _corrmatrix
TMatrixD URANIE::Sampler::TSampling::_corrmatrix |
The correlation matrix.
Referenced by ClassImp().
◆ _fLhsInput
LHSInput* URANIE::Sampler::TSampling::_fLhsInput |
Referenced by ClassImp().
◆ _ntype
EType URANIE::Sampler::TSampling::_ntype |
The type of sampling (SRS, LHS)
Referenced by ClassImp().