English Français

Documentation / Manuel développeur

Modules disponibles

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

Description of the class TExponentialCorrFunction. More...

#include <TExponentialCorrFunction.h>

Inheritance diagram for URANIE::Modeler::TExponentialCorrFunction:
Collaboration diagram for URANIE::Modeler::TExponentialCorrFunction:

Public Member Functions

Constructor and Destructor
 TExponentialCorrFunction (Int_t nbDim, Double_t *p=NULL, Double_t *corrLength=NULL)
 Default constructor.
 
virtual ~TExponentialCorrFunction ()
 Default destructor.
 
Get and Set methods
Double_t * getPower ()
 
virtual void setParameters (Double_t *newParams)
 Sets the parameters of the exponential correlation function.
 
void setPower (Double_t *p)
 Sets the power parameter.
 
void setCorrLengths (Double_t *corrLength)
 Sets the correlation lengths.
 
Tools
virtual TCorrelationFunctionclone ()
 Return a clone of the correlation function.
 
virtual void eval (Int_t n1, Double_t *x1, Int_t n2, Double_t *x2, Double_t *C)
 Compute the correlation between x1 and x2.
 
Printing Log
virtual void printLog (Option_t *option="")
 
- Public Member Functions inherited from URANIE::Modeler::TCorrelationFunction
 TCorrelationFunction ()
 Default constructor.
 
virtual ~TCorrelationFunction ()
 Default destructor.
 
Int_t getNParameters ()
 Return the number of parameters of the correlation function.
 
Int_t getNDimensions ()
 Return the number of dimensions of the input space.
 
Int_t getNCorrLengths ()
 Return the number of correlation lengths.
 
Double_t * getParameters ()
 Returns an array containing the parameters of the function.
 
Double_t * getCorrLengths ()
 Returns an array containing only the correlation lengths.
 
void setLog ()
 
void unsetLog ()
 
void changeLog ()
 
Bool_t getLog ()
 

Public Attributes

Double_t * _lPower
 array of power coefficients
 
- Public Attributes inherited from URANIE::Modeler::TCorrelationFunction
Bool_t _blog
 Boolean to decide if the log information is shown or not.
 
Double_t * parameters
 array containing the values of the function parameters. Correlation lengths are stored last.
 
Double_t * _lCorrLengths
 array containing only the correlation lengths.
 
Int_t nbDimensions
 number of dimensions of the input space
 
Int_t nbParameters
 total number of parameters
 
Int_t nbCorrLengths
 number of correlation lengths
 

Detailed Description

Description of the class TExponentialCorrFunction.

This class defines the shape of the correlation between two sets of variables as the function:

\[\exp\left(-\left|\frac{x1-x2}{lc}\right|^p \right)\]

where $lc$ is the correlation length and $p$ is the power. If $p = 2$, the function is equivalent to the Gaussian correlation function.

Constructor & Destructor Documentation

◆ TExponentialCorrFunction()

URANIE::Modeler::TExponentialCorrFunction::TExponentialCorrFunction ( Int_t  nbDim,
Double_t *  p = NULL,
Double_t *  corrLength = NULL 
)

Default constructor.

Parameters
nbDim(Int_t): number of dimension of the input variables
p(Double_t*): array of the power coefficients (size: nbDim). If NULL, the power coefficients are initialised to 1.0. (default = NULL).
corrLength(Double_t*): array of the correlation lengths for the function (size: nbDim). If NULL, the correlation lengths are initialised to 0.1. (default = NULL).

Referenced by ClassImp().

◆ ~TExponentialCorrFunction()

virtual URANIE::Modeler::TExponentialCorrFunction::~TExponentialCorrFunction ( )
virtual

Default destructor.

Referenced by ClassImp().

Member Function Documentation

◆ clone()

virtual TCorrelationFunction * URANIE::Modeler::TExponentialCorrFunction::clone ( )
virtual

Return a clone of the correlation function.

The clone must be destroyed by the object (or user) calling the function.

Implements URANIE::Modeler::TCorrelationFunction.

Referenced by ClassImp().

◆ eval()

virtual void URANIE::Modeler::TExponentialCorrFunction::eval ( Int_t  n1,
Double_t *  x1,
Int_t  n2,
Double_t *  x2,
Double_t *  C 
)
virtual

Compute the correlation between x1 and x2.

The order of the indices in the flat arrays are the following: x[i+j*d] = X[i,j] where X is a matrix of size (d x n), i is the line index, and j the column index. The results are stored in the flat array C.

Warning
Be aware that the matrix corresponding to flat arrays x1 and x2 have input dimensions as LINE, not columns. This means that for a set of point {(a1,b1),(a2,b2),(a3,b3)}, the corresponding matrix X will be: $ 
\left( 
\begin{array}{ccc}
a1 & a2 & a3 \\
                      b1 & b2 & b3 
\end{array}
\right)
$ and the corresponding flat array x = {a1,b1,a2,b2,a3,b3}.
Parameters
n1(Int_t): number of elements of x1
x1(Double_t*): data set x1 represented as a flat array (size: d * n1)
n2(Int_t): number of elements of x2
x2(Double_t*): data set x2 represented as a flat array (size: d * n2)
C(Double_t*): correlation matrix represented as a flat array (size: n1 * n2)
Exceptions
UErrorExceptionsif the gpLib function returns 1 (evaluation failed)

Implements URANIE::Modeler::TCorrelationFunction.

Referenced by ClassImp().

◆ getPower()

Double_t * URANIE::Modeler::TExponentialCorrFunction::getPower ( )
inline

References _lPower.

◆ printLog()

virtual void URANIE::Modeler::TExponentialCorrFunction::printLog ( Option_t *  option = "")
virtual

Reimplemented from URANIE::Modeler::TCorrelationFunction.

Referenced by ClassImp().

◆ setCorrLengths()

void URANIE::Modeler::TExponentialCorrFunction::setCorrLengths ( Double_t *  corrLength)
virtual

Sets the correlation lengths.

Parameters
corrLength(Double_t*): array containing the correlation length parameter. If the number of dimension of the inputs is $nbDim$, the array's size is $nbDim$.

Implements URANIE::Modeler::TCorrelationFunction.

Referenced by ClassImp().

◆ setParameters()

virtual void URANIE::Modeler::TExponentialCorrFunction::setParameters ( Double_t *  newParams)
virtual

Sets the parameters of the exponential correlation function.

Parameters
newParams(Double_t*): array containing the parameters of the correlation function. If the number of dimension of the inputs is $nbDim$, the array's size is $nbDim*2$. It is supposed to be of the form:

\[ newParams[nbDim*2] = {p[0],..., p[nbDim-1], lc[0],..., lc[nbDim-1]} \]

where $p$ is the power parameter (array of size $nbDim$) and $lc$ is the correlation length parameter (array of size $nbDim$).

Implements URANIE::Modeler::TCorrelationFunction.

Referenced by ClassImp().

◆ setPower()

void URANIE::Modeler::TExponentialCorrFunction::setPower ( Double_t *  p)

Sets the power parameter.

Parameters
p(Double_t*): array containing the power parameter. If the number of dimension of the inputs is $nbDim$, the array's size is $nbDim$.

Referenced by ClassImp().

Member Data Documentation

◆ _lPower

Double_t* URANIE::Modeler::TExponentialCorrFunction::_lPower

array of power coefficients

Referenced by ClassImp(), and getPower().