#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) |
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)
In | Returned vector (in place) |
yk | Kriged value |
sk | Standard deviation of estimation error |
u | Lower bound of integral (-inf if set to TEST) |
hnYc | Vector 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)
JJ | Output matrix |
In | Preliminary calculations (see _calculateII) |
yk | Kriged value |
sk | Standard deviation of Krging error |
u | Lower bound for integration |
hnYc | Vector of Hermite polynomials at cutoff |
phi |
double _convert2u | ( | double | yc, |
double | krigest, | ||
double | krigstd | ||
) |
VectorDouble hermiteCoefIndicator | ( | double | yc, |
int | nbpoly | ||
) |
yc | Cutoff Value |
nbpoly | Number of Hermite polynomials |
VectorDouble hermiteCoefLower | ( | double | y, |
int | nbpoly | ||
) |
Returns the vector of Hermite coefficients of the gaussian floored at 'y'
y | Floor value |
nbpoly | Number of Polynomial functions |
VectorDouble hermiteCoefMetal | ( | double | yc, |
const VectorDouble & | phi | ||
) |
yc | Cutoff Value |
phi | Coefficients of Hermite polynomial |
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
krigest | Vector of Kriging estimates |
krigstd | Vector of Kriging standard deviations |
phi | Array of Hermite coefficients |
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)
krigest | Vector of Kriging estimate |
krigstd | Vector of Kriging standard deviations |
phi | Array of Hermite coefficients |
double hermiteCondStdElement | ( | double | krigest, |
double | krigstd, | ||
const VectorDouble & | phi | ||
) |
MatrixSquareGeneral hermiteIncompleteIntegral | ( | double | yc, |
int | nbpoly | ||
) |
yc | Cutoff Value |
nbpoly | Number of Hermite polynomials |
VectorDouble hermiteIndicator | ( | double | yc, |
VectorDouble | krigest, | ||
VectorDouble | krigstd | ||
) |
yc | Cutoff Value |
krigest | Estimation |
krigstd | Standard deviation of estimation error |
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)
mean | Mean value |
sigma | Standard deviation |
nbpoly | Number of Hermite polynomials |
VectorDouble hermiteMetal | ( | double | yc, |
VectorDouble | krigest, | ||
VectorDouble | krigstd, | ||
const VectorDouble & | phi | ||
) |
yc | Cutoff Value |
krigest | Estimation |
krigstd | Standard deviation of estimation error |
phi | Hermite coefficients |
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, | ||
const VectorInt & | ifacs | ||
) |
Returns the vector of Hermite Polynomials selected by ranks
y | Target variable |
r | Change of support coefficient |
ifacs | Vector of ranks (staring from 0) |
VectorDouble hermitePolynomials | ( | double | y, |
double | r, | ||
int | nbpoly | ||
) |
Calculation of the Hermite Polynomials for a given value
y | Gaussian value for which the Hermite polynomials are calculated |
r | Change of support coefficient |
nbpoly | Number of Hermite polynomials |
double hermiteSeries | ( | const VectorDouble & | an, |
const VectorDouble & | hn | ||
) |
Evaluate the Hermite expansion
an | Series of coefficients of the Hermite polynomials |
hn | Hermite polynomial values |