English Français

Documentation / Manuel développeur

Modules disponibles

Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,   Uranie / DataServer: TMultinomialDistribution.h Source File
Uranie / DataServer v4.9.0
/* @license-end */
TMultinomialDistribution.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
41#ifndef TMULTINOMIALDISTRIBUTION_H
42#define TMULTINOMIALDISTRIBUTION_H
43
44//Uranie
45#include "TDiscreteAttribute.h"
46
47namespace URANIE
48{
49namespace DataServer
50{
52{
53private:
54protected:
55 Int_t iNbValues;
56 Double_t _dSumFreq;
57 Double_t* pValues;
58 Double_t* pFrequencies;
59public:
60 //---------------------------------------------
64
66
68
73
75
90 TMultinomialDistribution(TString name, Int_t nbValues, Double_t* values,
91 Double_t* frequencies = NULL);
92
96 //---------------------------------------------
101
102 virtual Int_t getNbValues();
103
105 virtual Double_t* getAllValues();
106
108 virtual Double_t getValue(Int_t i);
109
111 virtual Double_t* getAllFrequencies();
112
114 virtual Double_t getFrequency(Int_t i);
115
117 virtual Double_t getProba(Int_t i);
118
121
134 virtual void setDistribution(Int_t nbValues, Double_t* values,
135 Double_t* frequencies = NULL);
136
139 virtual void setAllValues(Double_t* values);
140
142 virtual void setValue(Int_t i, Double_t value);
143
146 virtual void setAllFrequencies(Double_t* frequencies);
147
149 virtual void setFrequency(Int_t i, Double_t frequencies);
151
157 virtual void computeMean();
160 virtual Double_t getCDF(Double_t x);
161
163
173 virtual Double_t getPDF(Double_t x, Double_t precision);
175 virtual Double_t getPDF(Double_t x);
176
178
184 virtual Double_t getInvCDF(Double_t p);
186
187 //---------------------------------------------
191 virtual void printLog(Option_t *option = "");
193
194 ClassDef(URANIE::DataServer::TMultinomialDistribution, ID_DATASERVER)
195};
196} // Fin du namespace DataServer
197} // Fin du namespace URANIE
198#endif
Class of attributes following a density of probability.
Definition TDiscreteAttribute.h:69
Description of the class TMultinomialDistribution.
Definition TMultinomialDistribution.h:52
virtual Double_t getFrequency(Int_t i)
Get a frequency by index.
virtual void setAllValues(Double_t *values)
virtual Double_t getPDF(Double_t x)
Same as before, but with precision fixed to 1e-9.
Double_t _dSumFreq
Definition TMultinomialDistribution.h:56
virtual Double_t getValue(Int_t i)
Get a value by index.
virtual Int_t getNbValues()
Get the number of values.
Int_t iNbValues
Definition TMultinomialDistribution.h:55
virtual void setAllFrequencies(Double_t *frequencies)
Double_t * pValues
Definition TMultinomialDistribution.h:57
virtual Double_t * getAllFrequencies()
Get the frequencies as a Double_t array.
virtual void setValue(Int_t i, Double_t value)
Set a value by index.
TMultinomialDistribution(TString name)
Constructor by name only.
TMultinomialDistribution(TString name, Int_t nbValues, Double_t *values, Double_t *frequencies=NULL)
Constructor by name and statistics.
virtual Double_t getPDF(Double_t x, Double_t precision)
Returns the probability of a value.
virtual void setFrequency(Int_t i, Double_t frequencies)
Set a single frequency by index.
virtual Double_t getProba(Int_t i)
Return the probability corresponding to the given index.
Double_t * pFrequencies
Definition TMultinomialDistribution.h:58
virtual Double_t * getAllValues()
Get the values as a Double_t array.
virtual ~TMultinomialDistribution()
Default destructor.
virtual Double_t getCDF(Double_t x)
virtual void setDistribution(Int_t nbValues, Double_t *values, Double_t *frequencies=NULL)
virtual void printLog(Option_t *option="")
virtual Double_t getInvCDF(Double_t p)
Returns a value from the distribution.
ROOT.
Definition TAttribute.h:106