English Français

Documentation / Manuel développeur

Modules disponibles

Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,   Uranie / Sampler: TSequence.h Source File
Uranie / Sampler v4.9.0
/* @license-end */
TSequence.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#ifndef TSequence_H
25#define TSequence_H
37#include "Rtypes.h"
38#include "TNamed.h"
39#include "TSampler.h"
40
41namespace URANIE
42{
43namespace Sampler
44{
45class TSequence: public TNamed
46{
47
48 // Attributes
49public:
50 ULong_t _nDim;
51 Double_t * _dValue; //[_nDim] ///< Pointeur
52 static Int_t _seqCounter;
53 static Bool_t _blog;
54
55 // Operations
56public:
57 //---------------------------------------------
61
64 TSequence(ULong_t ndim);
66 virtual ~TSequence();
68
69 //---------------------------------------------
74 virtual void setInstance(const ULong_t n) = 0;
75 virtual void init() = 0;
77
78 inline Double_t operator[](const ULong_t) const;
79 inline Double_t getComponent(const ULong_t) const;
80
81 //---------------------------------------------
85
87 void setLog()
88 {
89 _blog = kTRUE;
90 }
92 void unsetLog()
93 {
94 _blog = kFALSE;
95 }
96 virtual void printLog(Option_t *option = "");
98
99 ClassDef(URANIE::Sampler::TSequence, ID_SAMPLER)
100 //Classe de g�n�ration par Quasi Monte-Carlo
101};
102
104
105inline Double_t TSequence::operator[](const ULong_t j) const
106{
107 if (j >= _nDim)
108 {
109 throw URANIE::Exceptions::UErrorExceptions(__FILE__, __LINE__,
110 Form(
111 "TSequence::operator[] ERROR : the indice %lu is greater than the dimension[%lu]",
112 j, _nDim));
113 }
114 return (_dValue[j]);
115}
116
118
119inline Double_t TSequence::getComponent(const ULong_t j) const
120{
121 if (j >= _nDim)
122 {
123 throw URANIE::Exceptions::UErrorExceptions(__FILE__, __LINE__,
124 Form(
125 "TSequence::getComponent ERROR : the indice %lu is greater than the dimension[%lu]",
126 j, _nDim));
127 }
128 return (_dValue[j]);
129}
130
131} // Fin du namespace Sampler
132} // Fin du namespace URANIE
133#endif
134// fin du fichier $RCSfile$.
Creation of the abstract class TSampler.
Description of a sequence (qMC)
Definition TSequence.h:46
static Bool_t _blog
Log Printing.
Definition TSequence.h:53
void unsetLog()
Sets the static variable _blog at kFALSE.
Definition TSequence.h:92
void setLog()
Definition TSequence.h:87
virtual void printLog(Option_t *option="")
TSequence(ULong_t ndim)
Default constructor.
TSequence()
Default constructor.
Double_t * _dValue
Definition TSequence.h:51
ULong_t _nDim
The size of the sequence.
Definition TSequence.h:50
virtual ~TSequence()
Default destructor.
static Int_t _seqCounter
The counter of sequence.
Definition TSequence.h:52
virtual void setInstance(const ULong_t n)=0
Double_t operator[](const ULong_t) const
Definition TSequence.h:105
Double_t getComponent(const ULong_t) const
Definition TSequence.h:119
Definition TAMHCopula.h:60