English Français

Documentation / Manuel développeur

Modules disponibles

Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,   Uranie / Sampler: URANIE::Sampler::TSamplingMixture Class Reference
Uranie / Sampler v4.9.0
/* @license-end */
URANIE::Sampler::TSamplingMixture Class Reference

Interface with the simplex class developped by B. Secher (LGLS). More...

#include <TSamplingMixture.h>

Inheritance diagram for URANIE::Sampler::TSamplingMixture:
Collaboration diagram for URANIE::Sampler::TSamplingMixture:

Public Types

enum  EType {
  kSummit = 10 , kCenterEdge , kThirdEdge , kCenterFace ,
  kCenterSegment , kCentroide
}
 

Public Member Functions

Constructor and Destructor
 TSamplingMixture (URANIE::DataServer::TDataServer *tds, Int_t ns, Double_t dThreshold=1.0, Option_t *option="")
 Constructor from a TDataServer, the name of the method and the size of the sample.
 
virtual ~TSamplingMixture ()
 Default destructor.
 
void init ()
 The init method.
 
Setting and Getting global informations
const char * getNameInternalAttributeCandidatesPoints ()
 Return the name of the internal attribute to known if point is a candidates point ( equal to 0) or not ( greater or equal to 1)
 
const char * getNameInternalAttributeTypePoints ()
 Return the name of the internal attribute to known the type of points.
 
Int_t getNGeneratedSample ()
 Return the number of call of the generateSample method.
 
void setTrace (TString straceFile="")
 Activate the trace of the process.
 
void unsetTrace ()
 Unset trace.
 
Bool_t getTrace ()
 Return the trace flag.
 
TString getTraceFile ()
 Return the name of the trace file.
 
void setSummits ()
 Set the Flag of summits.
 
void unsetSummits ()
 Unset the Flag of summits.
 
void setCenterEdges ()
 Set the Flag of CenterEdges.
 
void unsetCenterEdges ()
 Unset the Flag of CenterEdges.
 
void setThirdEdges ()
 Set the Flag of ThirdEdges.
 
void unsetThirdEdges ()
 Unset the Flag of ThirdEdges.
 
void setCenterFaces ()
 Set the Flag of CenterFaces.
 
void unsetCenterFaces ()
 Unset the Flag of CenterFaces.
 
void setCentroide ()
 Set the Flag of Centroide.
 
void unsetCentroide ()
 Unset the Flag of Centroide.
 
void setCenterSegments ()
 Set the Flag of CenterSegments.
 
void unsetCenterSegments ()
 Unset the Flag of CenterSegments.
 
void setSaveCandidates ()
 Set the Flag of save candidates.
 
void unsetSaveCandidates ()
 Unset the Flag of CenterSegments.
 
Bool_t isSaveCandidates ()
 Return isSaveCandidates.
 
Treat relational constraints
void addConstraint (TVectorD vecConstraint)
 Add the constraint defined in a vector.
 
Generation of the sample
virtual void generateSample (Option_t *option="MD")
 Generates the sample.
 
void generateCandidates (Option_t *option)
 Generates the list of candidates.
 
Printing Log
virtual void printLog (Option_t *option="")
 Prints the log.
 
- Public Member Functions inherited from URANIE::Sampler::TSamplerDeterminist
 TSamplerDeterminist (URANIE::DataServer::TDataServer *tds, Option_t *option, Int_t ns)
 Constructor with a dataserver.
 
virtual ~TSamplerDeterminist ()
 Default destructor.
 
- 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 ()
 

Private Types

enum  ERelation { kLower , kUpper }
 

Private Member Functions

Fill the list of points in the TDS with a type void fillListOfCandidatesPoints (list< vector< double > > lst, EType typePoint)
 
Set The List of Candidates Points void setListOfCandidatesPoints ()
 

Private Attributes

Double_t _dThreshold
 constraint: \sum{x_{i} = dThreshold
 
vector< vector< double > > _planes
 The matrix of contraintes.
 
Simplex * _simplex
 Simplex Classe from B. Secher.
 
Bool_t _bSummits
 Flag for the summits.
 
Bool_t _bCenterEdges
 Flag for the CenterEdges.
 
Bool_t _bThirdEdges
 Flag for the ThirdEdges.
 
Bool_t _bCenterFaces
 Flag for the CenterFaces.
 
Bool_t _bCentroide
 Flag for the Centroide.
 
Bool_t _bCenterSegments
 Flag for the CenterSegments.
 
Bool_t _bSaveCandidates
 Flag for saving candidates points.
 
TString _sAttNameTypeOfPoints
 Name of the internal attribute for the type of points Etype (kSummit, kCenterEdge, ...)
 
TString _sAttNameCandidate
 Name of the internal attribute for candidates points(1) else 0.
 
Int_t _nGenerateSample
 The index of times that the generateSample method is call.
 
Bool_t _bTrace
 The flag to known is trace is needed.
 
TString _sTraceFile
 The name of the trace file.
 

Additional Inherited Members

- 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.
 

Detailed Description

Interface with the simplex class developped by B. Secher (LGLS).

The type of points are :Summit|CenterEdge|ThirdEdge|CenterFace|CenterSegment|Centroide

dot_inline_dotgraph_2.png

The _bCentroide attribute have two meanning in the two following method:

  • in the generateCandidates method, add the Centroide point in the list of candidates points (normal)
  • but, in the generateSample method, add the Centroide point in the sample even if the two algorithms (\it MM or \it MMD) \bf can \bf not select this point. Then, in this case we have $nS+1$ points in the sample.

Member Enumeration Documentation

◆ ERelation

Enumerator
kLower 
kUpper 

◆ EType

Enumerator
kSummit 
kCenterEdge 
kThirdEdge 
kCenterFace 
kCenterSegment 
kCentroide 

Constructor & Destructor Documentation

◆ TSamplingMixture()

URANIE::Sampler::TSamplingMixture::TSamplingMixture ( URANIE::DataServer::TDataServer *  tds,
Int_t  ns,
Double_t  dThreshold = 1.0,
Option_t *  option = "" 
)

Constructor from a TDataServer, the name of the method and the size of the sample.

Parameters
tds(TDataServer *) the TDS which contains attributes
ns(Int_t) The size of the sampling to generate
dThreshold(Double_t) the Threshold for the sum ( $ \sum{x_i} = dThreshold$)
option(Option_t *) The option to pass.
  • if option constains "save", the candidates points are stored in the TDS.

Referenced by ClassImp().

◆ ~TSamplingMixture()

virtual URANIE::Sampler::TSamplingMixture::~TSamplingMixture ( )
virtual

Default destructor.

Referenced by ClassImp().

Member Function Documentation

◆ addConstraint()

void URANIE::Sampler::TSamplingMixture::addConstraint ( TVectorD  vecConstraint)

Add the constraint defined in a vector.

The constraint defined by the equation

\[
0 \leq \alpha_0 + \alpha_1 x_1 + \alpha_2 x_2 + \cdots + \alpha_n x_n
\]

is stored in the vector as following $vec[0] = \alpha_0$, $vec[1] = \alpha_1$ and so on.

Referenced by ClassImp().

◆ fillListOfCandidatesPoints()

Fill the list of points in the TDS with a type void URANIE::Sampler::TSamplingMixture::fillListOfCandidatesPoints ( list< vector< double > >  lst,
EType  typePoint 
)
private

Referenced by ClassImp().

◆ generateCandidates()

void URANIE::Sampler::TSamplingMixture::generateCandidates ( Option_t *  option)

Generates the list of candidates.

Parameters
option(Option_t *) The option to pass.

Referenced by ClassImp().

◆ generateSample()

virtual void URANIE::Sampler::TSamplingMixture::generateSample ( Option_t *  option = "MD")
virtual

Generates the sample.

Two alagorithms are implemented

  • MD (for \it OptimalPointsFromMaximalDistance )
  • MMD (for \it OptimalPointsFromMaximalMinDistance)
    Parameters
    option(Option_t *) The option to pass (MD|MMD) (default MD).

Implements URANIE::Sampler::TSampler.

Referenced by ClassImp().

◆ getNameInternalAttributeCandidatesPoints()

const char * URANIE::Sampler::TSamplingMixture::getNameInternalAttributeCandidatesPoints ( )
inline

Return the name of the internal attribute to known if point is a candidates point ( equal to 0) or not ( greater or equal to 1)

A filter to known if a point is a candidate point or not.

tds->getTuple()->Scan("*", Form("%s>0", tmix->getNameInternalAttributeCandidatesPoints()));
If the candidates points are stored, then the design of experiment (the sampling) are points with this attribute is equal to 0.
tds->getTuple()->Scan("*", Form("%s == %d", tmix->getNameInternalAttributeCandidatesPoints(), tmix->getNGeneratedSample()));

References _sAttNameCandidate.

◆ getNameInternalAttributeTypePoints()

const char * URANIE::Sampler::TSamplingMixture::getNameInternalAttributeTypePoints ( )
inline

Return the name of the internal attribute to known the type of points.

The type of points are EType : kSummit=10, kCenterEdge, kThirdEdge, kCenterFace, kCenterSegment, kCentroide

References _sAttNameTypeOfPoints.

◆ getNGeneratedSample()

Int_t URANIE::Sampler::TSamplingMixture::getNGeneratedSample ( )
inline

Return the number of call of the generateSample method.

/return the number of call of the generateSample method

References _nGenerateSample.

◆ getTrace()

Bool_t URANIE::Sampler::TSamplingMixture::getTrace ( )
inline

Return the trace flag.

References _bTrace.

◆ getTraceFile()

TString URANIE::Sampler::TSamplingMixture::getTraceFile ( )

Return the name of the trace file.

Referenced by ClassImp().

◆ init()

void URANIE::Sampler::TSamplingMixture::init ( )

The init method.

This method is called at the end of the constructor.

This method adds the two internal attributes:

  • _sAttNameTypeOfPoints : to save the type of points from [Summit|CenterEdge|ThirdEdge|CenterFace|CenterSegment|Centroide];
  • _sAttNameCandidate : (optionnal when save request) to known if point is a candidate point (equal to 1) or a solution (equal to 0)

And, this method creates the constraints from the lower and upper bounds for each attributes.

Referenced by ClassImp().

◆ isSaveCandidates()

Bool_t URANIE::Sampler::TSamplingMixture::isSaveCandidates ( )
inline

Return isSaveCandidates.

References _bSaveCandidates.

◆ printLog()

virtual void URANIE::Sampler::TSamplingMixture::printLog ( Option_t *  option = "")
virtual

Prints the log.

Reimplemented from URANIE::Sampler::TSamplerDeterminist.

Referenced by ClassImp().

◆ setCenterEdges()

void URANIE::Sampler::TSamplingMixture::setCenterEdges ( )
inline

Set the Flag of CenterEdges.

References _bCenterEdges.

◆ setCenterFaces()

void URANIE::Sampler::TSamplingMixture::setCenterFaces ( )
inline

Set the Flag of CenterFaces.

References _bCenterFaces.

◆ setCenterSegments()

void URANIE::Sampler::TSamplingMixture::setCenterSegments ( )
inline

Set the Flag of CenterSegments.

References _bCenterSegments.

◆ setCentroide()

void URANIE::Sampler::TSamplingMixture::setCentroide ( )
inline

Set the Flag of Centroide.

References _bCentroide.

◆ setListOfCandidatesPoints()

Set The List of Candidates Points void URANIE::Sampler::TSamplingMixture::setListOfCandidatesPoints ( )
private

Referenced by ClassImp().

◆ setSaveCandidates()

void URANIE::Sampler::TSamplingMixture::setSaveCandidates ( )
inline

Set the Flag of save candidates.

References _bSaveCandidates.

◆ setSummits()

void URANIE::Sampler::TSamplingMixture::setSummits ( )
inline

Set the Flag of summits.

References _bSummits.

◆ setThirdEdges()

void URANIE::Sampler::TSamplingMixture::setThirdEdges ( )
inline

Set the Flag of ThirdEdges.

References _bThirdEdges.

◆ setTrace()

void URANIE::Sampler::TSamplingMixture::setTrace ( TString  straceFile = "")

Activate the trace of the process.

the trace is used only in the generateCandidate method

/param straceFile (TString) The name of the trace file (empty by defautt, then use the default name which is "_tsmix_trace.log" )

Referenced by ClassImp().

◆ unsetCenterEdges()

void URANIE::Sampler::TSamplingMixture::unsetCenterEdges ( )
inline

Unset the Flag of CenterEdges.

References _bCenterEdges.

◆ unsetCenterFaces()

void URANIE::Sampler::TSamplingMixture::unsetCenterFaces ( )
inline

Unset the Flag of CenterFaces.

References _bCenterFaces.

◆ unsetCenterSegments()

void URANIE::Sampler::TSamplingMixture::unsetCenterSegments ( )
inline

Unset the Flag of CenterSegments.

References _bCenterSegments.

◆ unsetCentroide()

void URANIE::Sampler::TSamplingMixture::unsetCentroide ( )
inline

Unset the Flag of Centroide.

References _bCentroide.

◆ unsetSaveCandidates()

void URANIE::Sampler::TSamplingMixture::unsetSaveCandidates ( )
inline

Unset the Flag of CenterSegments.

References _bSaveCandidates.

◆ unsetSummits()

void URANIE::Sampler::TSamplingMixture::unsetSummits ( )
inline

Unset the Flag of summits.

References _bSummits.

◆ unsetThirdEdges()

void URANIE::Sampler::TSamplingMixture::unsetThirdEdges ( )
inline

Unset the Flag of ThirdEdges.

References _bThirdEdges.

◆ unsetTrace()

void URANIE::Sampler::TSamplingMixture::unsetTrace ( )
inline

Unset trace.

References _bTrace.

Member Data Documentation

◆ _bCenterEdges

Bool_t URANIE::Sampler::TSamplingMixture::_bCenterEdges
private

Flag for the CenterEdges.

Referenced by ClassImp(), setCenterEdges(), and unsetCenterEdges().

◆ _bCenterFaces

Bool_t URANIE::Sampler::TSamplingMixture::_bCenterFaces
private

Flag for the CenterFaces.

Referenced by ClassImp(), setCenterFaces(), and unsetCenterFaces().

◆ _bCenterSegments

Bool_t URANIE::Sampler::TSamplingMixture::_bCenterSegments
private

Flag for the CenterSegments.

Referenced by ClassImp(), setCenterSegments(), and unsetCenterSegments().

◆ _bCentroide

Bool_t URANIE::Sampler::TSamplingMixture::_bCentroide
private

Flag for the Centroide.

Referenced by ClassImp(), setCentroide(), and unsetCentroide().

◆ _bSaveCandidates

Bool_t URANIE::Sampler::TSamplingMixture::_bSaveCandidates
private

Flag for saving candidates points.

Referenced by ClassImp(), isSaveCandidates(), setSaveCandidates(), and unsetSaveCandidates().

◆ _bSummits

Bool_t URANIE::Sampler::TSamplingMixture::_bSummits
private

Flag for the summits.

Referenced by ClassImp(), setSummits(), and unsetSummits().

◆ _bThirdEdges

Bool_t URANIE::Sampler::TSamplingMixture::_bThirdEdges
private

Flag for the ThirdEdges.

Referenced by ClassImp(), setThirdEdges(), and unsetThirdEdges().

◆ _bTrace

Bool_t URANIE::Sampler::TSamplingMixture::_bTrace
private

The flag to known is trace is needed.

Referenced by ClassImp(), getTrace(), and unsetTrace().

◆ _dThreshold

Double_t URANIE::Sampler::TSamplingMixture::_dThreshold
private

constraint: \sum{x_{i} = dThreshold

Referenced by ClassImp().

◆ _nGenerateSample

Int_t URANIE::Sampler::TSamplingMixture::_nGenerateSample
private

The index of times that the generateSample method is call.

Referenced by ClassImp(), and getNGeneratedSample().

◆ _planes

vector<vector<double> > URANIE::Sampler::TSamplingMixture::_planes
private

The matrix of contraintes.

Referenced by ClassImp().

◆ _sAttNameCandidate

TString URANIE::Sampler::TSamplingMixture::_sAttNameCandidate
private

Name of the internal attribute for candidates points(1) else 0.

Referenced by ClassImp(), and getNameInternalAttributeCandidatesPoints().

◆ _sAttNameTypeOfPoints

TString URANIE::Sampler::TSamplingMixture::_sAttNameTypeOfPoints
private

Name of the internal attribute for the type of points Etype (kSummit, kCenterEdge, ...)

Referenced by ClassImp(), and getNameInternalAttributeTypePoints().

◆ _simplex

Simplex* URANIE::Sampler::TSamplingMixture::_simplex
private

Simplex Classe from B. Secher.

Referenced by ClassImp().

◆ _sTraceFile

TString URANIE::Sampler::TSamplingMixture::_sTraceFile
private

The name of the trace file.

Referenced by ClassImp().