Documentation / Developer's manual
Available modules
Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,  
Uranie / Sampler v4.9.0
|
Abstraite class for sampling methods More...
#include <TSampler.h>
Public Member Functions | |
Constructor and Destructor | |
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. | |
Setting and Getting global informations | |
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. | |
Generates the sample | |
virtual void | generateSample (Option_t *option="")=0 |
Generates the Sample. | |
Treats the TAttributes | |
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. | |
Printing Log | |
void | setLog () |
void | unsetLog () |
void | changeLog () |
Bool_t | getLog () |
virtual void | printLog (Option_t *option="") |
Public Attributes | |
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. | |
Detailed Description
Abstraite class for sampling methods
This is the abstract class for sampling methods (determinist, stochastic). Usually, the constructors of these classes follow the following prototype :
where :
- tds : this is a pointer to a TDataServer which contains the attributes to be simulated. It can also contain other attributes which will not be sampled as they do not correspond to a recognized type if this method is used.
- option : it is a list of characters which precises options of the chosen method. For example for qMC methods, a king of sequence ("sobol" ou "halton") can be chosen.
- nCalcul : the size of the sample to be generated.
The type of the class must be considered be as a machine with 3 states :
avec
- init : this method enables the initialisation of all the information needed by the method (matrix, vector of the prime numbers for qMC). Among others, it permits to select the list of variables to be simulated ( _lstOfAttributesToSample ) which changes according to the adopted method : the TAttributes, borned for the determinist methods qMC and the TStochAttribut for the stoachastic methods (SRS, LHS).
- generateSample : the method of samples generation itself. It consists in filling the TDataServer which is passed as argument to the constructor.
- terminate
the pure virtual methods
To make the class useful, the daughter classes of TSampler must define the pure virtual method generateSample. This method returns the TDataServer for generating a sample.
The virtual methods
The sampling method generateSample is seen as a state machine,
Constructor & Destructor Documentation
◆ TSampler()
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.
Referenced by ClassImp().
◆ ~TSampler()
|
virtual |
Default destructor.
Referenced by ClassImp().
Member Function Documentation
◆ changeLog()
|
inline |
References _blog.
◆ createListOfAttributes()
|
virtual |
Creates the List of attributes to simulate.
Reimplemented in URANIE::Sampler::TImportanceSampling, URANIE::Sampler::TSamplerField, and URANIE::Sampler::TVQ.
Referenced by ClassImp().
◆ createTuple()
|
virtual |
Creates the TDSNtupleD of data with only the TStochasticAttributes.
Reimplemented in URANIE::Sampler::TConstrLHS, URANIE::Sampler::TMaxiMinLHS, URANIE::Sampler::TOATSampling, and URANIE::Sampler::TRafuSampling.
Referenced by ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), URANIE::Sampler::TBasicSampling::generateCorrSample(), URANIE::Sampler::TBasicSampling::generateSample(), and URANIE::Sampler::TSamplerField::generateSample().
◆ fillOtherAttributes()
|
virtual |
Fills the TDSNtupleD of data with other TFormulaAttributes.
Reimplemented in URANIE::Sampler::TBasicSampling, URANIE::Sampler::TConstrLHS, and URANIE::Sampler::TMaxiMinLHS.
Referenced by ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), URANIE::Sampler::TBasicSampling::fillOtherAttributes(), and URANIE::Sampler::TSamplerField::generateSample().
◆ generateSample()
|
pure virtual |
Generates the Sample.
Implemented in URANIE::Sampler::TOA, URANIE::Sampler::TBasicSampling, URANIE::Sampler::TConstrLHS, URANIE::Sampler::TCopula, URANIE::Sampler::TGaussianSampling, URANIE::Sampler::TImportanceSampling, URANIE::Sampler::TMaxiMinLHS, URANIE::Sampler::TNeuralGas, URANIE::Sampler::TOATDesign, URANIE::Sampler::TOATSampling, URANIE::Sampler::TOATSamplingMultiNominal, URANIE::Sampler::TPetras, URANIE::Sampler::TQMC, URANIE::Sampler::TRafuSampling, URANIE::Sampler::TSamplerField, URANIE::Sampler::TSampling, URANIE::Sampler::TSpaceFilling, and URANIE::Sampler::TSamplingMixture.
Referenced by URANIE::Sampler::TVQ::getSubSample().
◆ GetID()
|
inline |
Returns the ID of the class.
- Todo:
- Adapt to the right form, and see location of the file which contains these informations.
Referenced by ClassImp(), ClassImp(), URANIE::Sampler::TSamplerField::printLog(), and URANIE::Sampler::TSamplerStochastic::printLog().
◆ getLog()
|
inline |
References _blog.
◆ getMethodName()
|
inline |
Gets the method name.
References _sMethod.
◆ getTDS()
|
inlinevirtual |
Return the TDS filling by the sampling algorithm.
This method returns the TDS filling by the sampling algorithm
Reimplemented in URANIE::Sampler::TImportanceSampling.
References _tds.
◆ getTuple()
|
inline |
Returns the TDSNtupleD of data.
References _ntsample.
◆ parseOption()
void URANIE::Sampler::TSampler::parseOption | ( | Option_t * | option | ) |
Parse the option.
Referenced by ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), URANIE::Sampler::TBasicSampling::generateCorrSample(), and URANIE::Sampler::TBasicSampling::generateSample().
◆ printLog()
|
virtual |
Reimplemented in URANIE::Sampler::TAMHCopula, URANIE::Sampler::TArchimedianCopula, URANIE::Sampler::TBasicSampling, URANIE::Sampler::TClaytonCopula, URANIE::Sampler::TConstrLHS, URANIE::Sampler::TCopula, URANIE::Sampler::TEllipticalCopula, URANIE::Sampler::TFrankCopula, URANIE::Sampler::TGaussianCopula, URANIE::Sampler::TGaussianSampling, URANIE::Sampler::TImportanceSampling, URANIE::Sampler::TMaxiMinLHS, URANIE::Sampler::TNeuralGas, URANIE::Sampler::TOA, URANIE::Sampler::TOATDesign, URANIE::Sampler::TOATSampling, URANIE::Sampler::TOATSamplingMultiNominal, URANIE::Sampler::TPetras, URANIE::Sampler::TPlackettCopula, URANIE::Sampler::TQMC, URANIE::Sampler::TRafuSampling, URANIE::Sampler::TSamplerDeterminist, URANIE::Sampler::TSamplerField, URANIE::Sampler::TSamplerStochastic, URANIE::Sampler::TSampling, URANIE::Sampler::TSamplingMixture, URANIE::Sampler::TSpaceFilling, and URANIE::Sampler::TVQ.
Referenced by ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), and URANIE::Sampler::TSamplerStochastic::printLog().
◆ setLog()
|
inline |
References _blog.
◆ setMethodName()
|
inline |
Sets the method name in a global variable.
References _sMethod.
Referenced by URANIE::Sampler::TBasicSampling::TBasicSampling(), and URANIE::Sampler::TSamplerField::TSamplerField().
◆ unsetLog()
|
inline |
References _blog.
Member Data Documentation
◆ _blog
Bool_t URANIE::Sampler::TSampler::_blog |
Log Printing.
Referenced by changeLog(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), URANIE::Sampler::TSamplerField::createListOfAttributes(), URANIE::Sampler::TVQ::createListOfAttributes(), URANIE::Sampler::TSamplerField::Draw2D(), URANIE::Sampler::TBasicSampling::generateCorrSample(), URANIE::Sampler::TBasicSampling::generateSample(), URANIE::Sampler::TNeuralGas::generateSample(), URANIE::Sampler::TSamplerField::generateSample(), getLog(), URANIE::Sampler::TNeuralGas::init(), URANIE::Sampler::TSamplerStochastic::init(), URANIE::Sampler::TVQ::init(), URANIE::Sampler::TNeuralGas::learn(), setLog(), URANIE::Sampler::TVQ::shuffle(), URANIE::Sampler::TBasicSampling::TBasicSampling(), URANIE::Sampler::TSamplerStochastic::terminate(), URANIE::Sampler::TVQ::terminate(), URANIE::Sampler::TSamplerField::TSamplerField(), unsetLog(), and URANIE::Sampler::TBasicSampling::~TBasicSampling().
◆ _bupdateFile
Bool_t URANIE::Sampler::TSampler::_bupdateFile |
Update the back up file when generating the attributeformula if there is some.
Referenced by ClassImp().
◆ _lstOfAttributesToSample
TList* URANIE::Sampler::TSampler::_lstOfAttributesToSample |
The list of Stochastic Attributes to sample.
Referenced by ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), URANIE::Sampler::TSamplerField::createListOfAttributes(), URANIE::Sampler::TVQ::createListOfAttributes(), URANIE::Sampler::TBasicSampling::findSimilar(), URANIE::Sampler::TBasicSampling::generateCorrSample(), URANIE::Sampler::TBasicSampling::generateSample(), URANIE::Sampler::TNeuralGas::generateSample(), URANIE::Sampler::TNeuralGas::init(), URANIE::Sampler::TSamplerStochastic::init(), URANIE::Sampler::TVQ::init(), and URANIE::Sampler::TNeuralGas::learn().
◆ _nS
Int_t URANIE::Sampler::TSampler::_nS |
The size of the sample.
Referenced by ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), URANIE::Sampler::TBasicSampling::generateCorrSample(), URANIE::Sampler::TBasicSampling::generateSample(), URANIE::Sampler::TNeuralGas::generateSample(), URANIE::Sampler::TSamplerField::generateSample(), URANIE::Sampler::TNeuralGas::init(), URANIE::Sampler::TNeuralGas::learn(), URANIE::Sampler::TBasicSampling::printLog(), URANIE::Sampler::TSpaceFilling::setSize(), URANIE::Sampler::TSamplerField::SpectralSimulate(), URANIE::Sampler::TNeuralGas::TNeuralGas(), and URANIE::Sampler::TSamplerField::TSamplerField().
◆ _ntsample
URANIE::DataServer::TDSNtupleD* URANIE::Sampler::TSampler::_ntsample |
the tntuple of data
Referenced by ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), URANIE::Sampler::TSamplerField::Draw2D(), URANIE::Sampler::TBasicSampling::generateCorrSample(), URANIE::Sampler::TBasicSampling::generateSample(), URANIE::Sampler::TSamplerField::generateSample(), getTuple(), and URANIE::Sampler::TSamplerField::SpectralSimulate().
◆ _nX
Int_t URANIE::Sampler::TSampler::_nX |
The size of attributes to sample.
Referenced by ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), URANIE::Sampler::TSamplerField::createListOfAttributes(), URANIE::Sampler::TVQ::createListOfAttributes(), URANIE::Sampler::TSamplerField::Draw2D(), URANIE::Sampler::TBasicSampling::findSimilar(), URANIE::Sampler::TBasicSampling::generateCorrSample(), URANIE::Sampler::TBasicSampling::generateSample(), URANIE::Sampler::TNeuralGas::init(), URANIE::Sampler::TNeuralGas::learn(), URANIE::Sampler::TBasicSampling::printLog(), URANIE::Sampler::TBasicSampling::setCorrelationMatrix(), URANIE::Sampler::TBasicSampling::setUserCorrelation(), and URANIE::Sampler::TSamplerField::TSamplerField().
◆ _sMethod
TString URANIE::Sampler::TSampler::_sMethod |
The title of the sampler method.
Referenced by ClassImp(), ClassImp(), ClassImp(), ClassImp(), getMethodName(), URANIE::Sampler::TBasicSampling::printLog(), URANIE::Sampler::TSamplerField::printLog(), and setMethodName().
◆ _tds
URANIE::DataServer::TDataServer* URANIE::Sampler::TSampler::_tds |
Pointer to a TDS.
Referenced by ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), URANIE::Sampler::TSamplerField::createListOfAttributes(), URANIE::Sampler::TVQ::createListOfAttributes(), URANIE::Sampler::TSamplerField::Draw2D(), URANIE::Sampler::TBasicSampling::fillOtherAttributes(), URANIE::Sampler::TBasicSampling::generateCorrSample(), URANIE::Sampler::TBasicSampling::generateSample(), URANIE::Sampler::TNeuralGas::generateSample(), URANIE::Sampler::TSamplerField::generateSample(), getTDS(), URANIE::Sampler::TNeuralGas::init(), URANIE::Sampler::TSamplerStochastic::init(), URANIE::Sampler::TVQ::init(), URANIE::Sampler::TNeuralGas::learn(), URANIE::Sampler::TBasicSampling::setUserCorrelation(), URANIE::Sampler::TSamplerField::SpectralSimulate(), URANIE::Sampler::TNeuralGas::TNeuralGas(), and URANIE::Sampler::TSamplerField::TSamplerField().