1.2.0
CCC
 
Hermite.cpp File Reference
#include "geoslib_old_f.h"
#include "Polynomials/Hermite.hpp"
#include "Matrix/MatrixSquareGeneral.hpp"
#include "Basic/Utilities.hpp"
#include "Basic/Law.hpp"
#include "Basic/VectorHelper.hpp"
#include <math.h>

Functions

double _convert2u (double yc, double krigest, double krigstd)
 
void _calculateIn (VectorDouble &In, double yk, double sk, double u, const VectorDouble &hnYc)
 
void _calculateJJ (MatrixSquareGeneral &JJ, VectorDouble &In, double yk, double sk, double u, const VectorDouble &hnYc, const VectorDouble &phi)
 
VectorDouble hermitePolynomials (double y, double r, int nbpoly)
 
VectorDouble hermitePolynomials (double y, double r, const VectorInt &ifacs)
 
VectorDouble hermiteCondExp (VectorDouble krigest, VectorDouble krigstd, const VectorDouble &phi)
 
double hermiteCondExpElement (double krigest, double krigstd, const VectorDouble &phi)
 
VectorDouble hermiteCondStd (VectorDouble krigest, VectorDouble krigstd, const VectorDouble &phi)
 
double hermiteCondStdElement (double krigest, double krigstd, const VectorDouble &phi)
 
VectorDouble hermiteIndicator (double yc, VectorDouble krigest, VectorDouble krigstd)
 
double hermiteIndicatorElement (double yc, double krigest, double krigstd)
 
VectorDouble hermiteIndicatorStd (double yc, VectorDouble krigest, VectorDouble krigstd)
 
double hermiteIndicatorStdElement (double yc, double krigest, double krigstd)
 
VectorDouble hermiteMetal (double yc, VectorDouble krigest, VectorDouble krigstd, const VectorDouble &phi)
 
double hermiteMetalElement (double yc, double krigest, double krigstd, const VectorDouble &phi)
 
VectorDouble hermiteMetalStd (double yc, VectorDouble krigest, VectorDouble krigstd, const VectorDouble &phi)
 
double hermiteMetalStdElement (double yc, double krigest, double krigstd, const VectorDouble &phi)
 
VectorDouble hermiteCoefIndicator (double yc, int nbpoly)
 
VectorDouble hermiteCoefMetal (double yc, const VectorDouble &phi)
 
MatrixSquareGeneral hermiteIncompleteIntegral (double yc, int nbpoly)
 
VectorDouble hermiteLognormal (double mean, double sigma, int nbpoly)
 
double hermiteSeries (const VectorDouble &an, const VectorDouble &hn)
 
VectorDouble hermiteCoefLower (double y, int nbpoly)
 
VectorDouble hermiteIndicatorLower (double y, int nbpoly)
 

Function Documentation

void _calculateIn ( VectorDouble In,
double  yk,
double  sk,
double  u,
const VectorDouble hnYc 
)

Calculate In(u,v) = int_u^v H_n(yk + sk * t) g(t) dt (with v = +Inf)

Parameters
InReturned vector (in place)
ykKriged value
skStandard deviation of estimation error
uLower bound of integral (-inf if set to TEST)
hnYcVector of Hermite polynomials at cutoff
void _calculateJJ ( MatrixSquareGeneral JJ,
VectorDouble In,
double  yk,
double  sk,
double  u,
const VectorDouble hnYc,
const VectorDouble phi 
)

Calculate matrix JJ(n,p) = int_u_v H_n(y+st) H_p(y+st) g(t) dt (with v = +Inf)

Parameters
JJOutput matrix
InPreliminary calculations (see _calculateII)
ykKriged value
skStandard deviation of Krging error
uLower bound for integration
hnYcVector of Hermite polynomials at cutoff
phi
double _convert2u ( double  yc,
double  krigest,
double  krigstd 
)
VectorDouble hermiteCoefIndicator ( double  yc,
int  nbpoly 
)
Parameters
ycCutoff Value
nbpolyNumber of Hermite polynomials
Returns
The vector of coefficients of the Indicator
VectorDouble hermiteCoefLower ( double  y,
int  nbpoly 
)

Returns the vector of Hermite coefficients of the gaussian floored at 'y'

Parameters
yFloor value
nbpolyNumber of Polynomial functions
Returns
Hermite Coefficients
VectorDouble hermiteCoefMetal ( double  yc,
const VectorDouble phi 
)
Parameters
ycCutoff Value
phiCoefficients of Hermite polynomial
Returns
The vector of coefficients of the Metal Quantity
VectorDouble hermiteCondExp ( VectorDouble  krigest,
VectorDouble  krigstd,
const VectorDouble phi 
)

Calculate the Conditional Expectation: E[Z | Z1=z1, Z2=z2, ..., Zn=zn] = int Phi(y_kk + s_k u) g(u) du

Parameters
krigestVector of Kriging estimates
krigstdVector of Kriging standard deviations
phiArray of Hermite coefficients
Returns
Conditional Expectation
double hermiteCondExpElement ( double  krigest,
double  krigstd,
const VectorDouble phi 
)
VectorDouble hermiteCondStd ( VectorDouble  krigest,
VectorDouble  krigstd,
const VectorDouble phi 
)

Vector of conditional variances (same dimension as krigest and krigstd)

Parameters
krigestVector of Kriging estimate
krigstdVector of Kriging standard deviations
phiArray of Hermite coefficients
Returns
double hermiteCondStdElement ( double  krigest,
double  krigstd,
const VectorDouble phi 
)
MatrixSquareGeneral hermiteIncompleteIntegral ( double  yc,
int  nbpoly 
)
Parameters
ycCutoff Value
nbpolyNumber of Hermite polynomials
Returns
The matrix of Incomplete Integral (Dimension: nbpoly * nbpoly)
VectorDouble hermiteIndicator ( double  yc,
VectorDouble  krigest,
VectorDouble  krigstd 
)
Parameters
ycCutoff Value
krigestEstimation
krigstdStandard deviation of estimation error
Returns
The indicator above Cutoff
double hermiteIndicatorElement ( double  yc,
double  krigest,
double  krigstd 
)
VectorDouble hermiteIndicatorLower ( double  y,
int  nbpoly 
)
VectorDouble hermiteIndicatorStd ( double  yc,
VectorDouble  krigest,
VectorDouble  krigstd 
)
double hermiteIndicatorStdElement ( double  yc,
double  krigest,
double  krigstd 
)
VectorDouble hermiteLognormal ( double  mean,
double  sigma,
int  nbpoly 
)

Hermite coefficient for a lognormal transform mean * exp(sigma * Y + 1/2 * sigma^2)

Parameters
meanMean value
sigmaStandard deviation
nbpolyNumber of Hermite polynomials
Returns
The array of coefficients
VectorDouble hermiteMetal ( double  yc,
VectorDouble  krigest,
VectorDouble  krigstd,
const VectorDouble phi 
)
Parameters
ycCutoff Value
krigestEstimation
krigstdStandard deviation of estimation error
phiHermite coefficients
Returns
The Metal
double hermiteMetalElement ( double  yc,
double  krigest,
double  krigstd,
const VectorDouble phi 
)
VectorDouble hermiteMetalStd ( double  yc,
VectorDouble  krigest,
VectorDouble  krigstd,
const VectorDouble phi 
)
double hermiteMetalStdElement ( double  yc,
double  krigest,
double  krigstd,
const VectorDouble phi 
)
VectorDouble hermitePolynomials ( double  y,
double  r,
int  nbpoly 
)

Calculation of the Hermite Polynomials for a given value

Parameters
yGaussian value for which the Hermite polynomials are calculated
rChange of support coefficient
nbpolyNumber of Hermite polynomials
Returns
The vector of polynomials (Dimension: nbpoly)
VectorDouble hermitePolynomials ( double  y,
double  r,
const VectorInt ifacs 
)

Returns the vector of Hermite Polynomials selected by ranks

Parameters
yTarget variable
rChange of support coefficient
ifacsVector of ranks (staring from 0)
Returns
The vector of Hi(y) where 'i' is in 'ifacs'
double hermiteSeries ( const VectorDouble an,
const VectorDouble hn 
)

Evaluate the Hermite expansion

Parameters
anSeries of coefficients of the Hermite polynomials
hnHermite polynomial values
Returns
The result of the expansion