gstlearn  0.2.1
Geostatistics & Machine Learning toolbox
KrigingSystem Class Reference

#include <KrigingSystem.hpp>

Public Member Functions

 KrigingSystem (Db *dbin, Db *dbout, const Model *model, ANeighParam *neighParam)
 
 KrigingSystem (const KrigingSystem &m)=delete
 
KrigingSystemoperator= (const KrigingSystem &m)=delete
 
virtual ~KrigingSystem ()
 
int setKrigOptCalcul (const EKrigOpt &calcul, const VectorInt &ndiscs=VectorInt(), bool flag_per_cell=false)
 
int setKrigOptXValid (bool flag_xvalid, bool flag_kfold, bool optionXValidEstim=false, bool optionXValidStdev=false, bool optionXValidVarZ=false)
 
int setKrigOptColCok (const VectorInt &rank_colcok)
 
int setKrigOptBayes (bool flag_bayes, const VectorDouble &prior_mean, const VectorDouble &prior_cov)
 
int setKrigOptDataWeights (int iptrWeights, bool flagSet=true)
 
int setKrigOptMatCL (const VectorVectorDouble &matCL)
 
int setKrigoptCode (bool flag_code)
 
int setKrigOptFlagSimu (bool flagSimu, int nbsimu=0, int rankPGS=-1)
 
int setKrigOptSaveWeights (bool flag_save)
 
int setKrigOptDGM (bool flag_dgm, double eps=EPSILON6)
 
int setKrigOptFlagGlobal (bool flag_global)
 
int setKrigOptFlagLTerm (bool flag_lterm)
 
int setKrigOptAnamophosis (AAnam *anam)
 
int setKrigOptFactorKriging (bool flag_factor_kriging)
 
int updKrigOptEstim (int iptrEst, int iptrStd, int iptrVarZ)
 
int updKrigOptIclass (int index_class, int nclasses)
 
int updKrigOptCheckAddress (bool flagCheckAddress)
 
int updKrigOptNeighOnly (int iptrNeigh)
 
bool isReady ()
 
int estimate (int iech_out)
 
int getNDim () const
 
int getNech () const
 
int getNeq () const
 
int getNRed () const
 
VectorInt getSampleIndices () const
 
VectorDouble getSampleCoordinates () const
 
VectorDouble getSampleData () const
 
VectorDouble getZam () const
 
VectorDouble getLHS () const
 
VectorDouble getLHSInv () const
 
VectorDouble getRHSC () const
 
VectorDouble getRHSC (int ivar) const
 
VectorDouble getWeights () const
 
VectorDouble getVariance () const
 
double getLTerm () const
 

Private Member Functions

int _getNVar () const
 
int _getNVarCL () const
 
int _getNbfl () const
 
int _getNFeq () const
 
int _getNFex () const
 
int _getNDisc () const
 
void _setFlag (int iech, int ivar, int value)
 
int _getFlag (int iech, int ivar)
 
double _getIdim (int loc_rank, int idim) const
 
double _getFext (int rank, int ibfl) const
 
double _getIvar (int rank, int ivar) const
 
double _getVerr (int rank, int ivar) const
 
double _getMean (int ivarCL) const
 
double _getCoefDrift (int ivar, int il, int ib) const
 
void _getDistance (int loc_rank1, int loc_rank2, VectorDouble &dd) const
 
int _IND (int iech, int ivar, int nech) const
 
int _getFLAG (int iech, int ivar) const
 
double _getCOVTAB (int ivar, int jvar) const
 
void _setCOVTAB (int ivar, int jvar, double value)
 
void _addCOVTAB (int ivar, int jvar, double value)
 
void _prodCOVTAB (int ivar, int jvar, double value)
 
double _getRHS (int iech, int ivar, int jvCL) const
 
void _setRHS (int iech, int ivar, int jvCL, double value, bool isForDrift=false)
 
double _getRHSC (int i, int jvCL) const
 
double _getWGTC (int i, int jvCL) const
 
double _getLHS (int iech, int ivar, int jech, int jvar) const
 
double _getLHSINV (int iech, int ivar, int jech, int jvar) const
 
void _setLHS (int iech, int ivar, int jech, int jvar, double value, bool isForDrift=false)
 
void _addLHS (int iech, int ivar, int jech, int jvar, double value)
 
void _prodLHS (int iech, int ivar, int jech, int jvar, double value)
 
double _getLHSC (int i, int j) const
 
double _getDISC1 (int idisc, int idim) const
 
void _setDISC1 (int idisc, int idim, double value)
 
double _getDISC2 (int idisc, int idim) const
 
void _setDISC2 (int idisc, int idim, double value)
 
double _getVAR0 (int ivCL, int jvCL) const
 
void _setVAR0 (int ivCL, int jvCL, double value)
 
void _resetMemoryPerNeigh ()
 
void _resetMemoryGeneral ()
 
void _flagDefine ()
 
void _covtabInit ()
 
void _covtabCalcul (const ECalcMember &member, const CovCalcMode &mode, int iech1, int iech2, const VectorDouble &d1)
 
void _drftabCalcul (const ECalcMember &member, int iech)
 
bool _isAuthorized ()
 
double _continuousMultiplier (int rank1, int rank2, double eps=EPSILON4)
 
void _lhsCalcul ()
 
void _lhsIsoToHetero ()
 
void _lhsDump (int nbypas=5)
 
int _rhsCalcul ()
 
void _rhsIsoToHetero ()
 
void _rhsDump ()
 
void _wgtCalcul ()
 
void _wgtDump (int status)
 
VectorInt _getRelativePosition ()
 
int _lhsInvert ()
 
void _dual ()
 
int _prepar ()
 
void _estimateCalcul (int status)
 
void _estimateCalculImage (int status)
 
void _estimateCalculXvalidUnique (int status)
 
void _simulateCalcul (int status)
 
void _neighCalcul (int status, const VectorDouble &tab)
 
double _estimateVarZ (int ivarCL, int jvarCL)
 
double _variance (int ivarCL, int jvarCL)
 
void _variance0 ()
 
void _krigingDump (int status)
 
void _simulateDump (int status)
 
void _saveWeights (int status)
 
void _blockDiscretize ()
 
bool _isCorrect ()
 
void _checkAddress (const String &title, const String &theme, int ival, int nval) const
 
bool _prepareForImage (const NeighImage *neighI)
 
bool _prepareForImageKriging (Db *dbaux)
 
int _bayesPreCalculations ()
 
void _bayesPreSimulate ()
 
void _bayesCorrectVariance ()
 
void _transformGaussianToRaw ()
 
int _getFlagAddress (int iech0, int ivar0)
 
bool _isMatCLempty () const
 

Private Attributes

Db_dbin
 
Db_dbout
 
Model_modelInit
 
ANeighParam_neighParam
 
const AAnam_anam
 
bool _isReady
 
Model_model
 
int _iptrEst
 UID for storage. More...
 
int _iptrStd
 
int _iptrVarZ
 
bool _flagEst
 
bool _flagStd
 
bool _flagVarZ
 
bool _flagGlobal
 
bool _flagDataChanged
 
EKrigOpt _calcul
 Option for Calculation. More...
 
int _iptrWeights
 Option for Weights at Data locations. More...
 
bool _flagWeights
 
bool _flagSet
 
bool _flagSimu
 Option for Simulation. More...
 
int _nbsimu
 
int _rankPGS
 
bool _flagCode
 Options complement for neighborhood. More...
 
bool _flagPerCell
 Option for Block estimation. More...
 
int _ndiscNumber
 
VectorInt _ndiscs
 
VectorDouble _disc1
 
VectorDouble _disc2
 
bool _xvalidEstim
 Option for Cross_validation. More...
 
bool _xvalidStdev
 
bool _xvalidVarZ
 
VectorInt _rankColCok
 Option for Colocation. More...
 
bool _flagBayes
 Option for Bayesian. More...
 
VectorDouble _priorMean
 
VectorDouble _priorCov
 
VectorDouble _postMean
 
VectorDouble _postCov
 
VectorVectorDouble _postSimu
 
VectorDouble _varCorrec
 
Model_modelSimple
 
bool _flagDGM
 Option for Discrete Gaussian Model. More...
 
bool _flagFactorKriging
 Option for (Disjunctive) Kriging of Factor. More...
 
int _nclasses
 
VectorVectorDouble _matCL
 Option for Estimating the Linear Combination of Variables. More...
 
bool _flagLTerm
 Option for asking for Z * A-1 * Z. More...
 
double _lterm
 
bool _flagAnam
 Option for Gaussian Kriging. More...
 
DbGrid_dbaux
 Option for Estimation based on Image. More...
 
bool _flagKeypairWeights
 Option for saving the Weights using Keypair mechanism. More...
 
bool _flagNeighOnly
 Option for Neighboring test. More...
 
int _iptrNeigh
 
int _iechOut
 Local variables. More...
 
int _nred
 
bool _flagCheckAddress
 Working arrays. More...
 
NeighWork _nbghWork
 
VectorInt _nbgh
 
VectorInt _flag
 
VectorDouble _covtab
 
VectorDouble _drftab
 
VectorDouble _lhs
 
VectorDouble _lhsinv
 
VectorDouble _rhs
 
VectorDouble _wgt
 
VectorDouble _zam
 
VectorDouble _var0
 
VectorInt _dbinUidToBeDeleted
 
VectorInt _dboutUidToBeDeleted
 

Constructor & Destructor Documentation

◆ KrigingSystem() [1/2]

KrigingSystem::KrigingSystem ( Db dbin,
Db dbout,
const Model model,
ANeighParam neighParam 
)

◆ KrigingSystem() [2/2]

KrigingSystem::KrigingSystem ( const KrigingSystem m)
delete

◆ ~KrigingSystem()

KrigingSystem::~KrigingSystem ( )
virtual

Member Function Documentation

◆ _addCOVTAB()

void KrigingSystem::_addCOVTAB ( int  ivar,
int  jvar,
double  value 
)
private

◆ _addLHS()

void KrigingSystem::_addLHS ( int  iech,
int  ivar,
int  jech,
int  jvar,
double  value 
)
private

◆ _bayesCorrectVariance()

void KrigingSystem::_bayesCorrectVariance ( )
private

Correct the array of Variance in Bayesian case

◆ _bayesPreCalculations()

int KrigingSystem::_bayesPreCalculations ( )
private

Perform the Bayesian estimation of the Drift Coefficients (only in Unique Neighborhood)

◆ _bayesPreSimulate()

void KrigingSystem::_bayesPreSimulate ( )
private

Simulate the drift coefficients from the posterior distributions

◆ _blockDiscretize()

void KrigingSystem::_blockDiscretize ( )
private

◆ _checkAddress()

void KrigingSystem::_checkAddress ( const String title,
const String theme,
int  ival,
int  nval 
) const
private

◆ _continuousMultiplier()

double KrigingSystem::_continuousMultiplier ( int  rank1,
int  rank2,
double  eps = EPSILON4 
)
private

Returns the additional variance for continuous moving neighborhood

Returns
Variance multiplier for Continuous Option
Parameters
[in]rank1Rank of the sample in the first Db
[in]rank2Rank of the sample in the second Db
[in]epsDistance tolerance
Remarks
In the case of a neighborhood which is not MOVING (or undefined),
this function systematically returns 0.

◆ _covtabCalcul()

void KrigingSystem::_covtabCalcul ( const ECalcMember &  member,
const CovCalcMode mode,
int  iech1,
int  iech2,
const VectorDouble d1 
)
private

Module for calculating the covariance internally It is called for LHS (iech1>=0 && iech2>=0), RHS (iech1>=0 && iech2=-1) and VAR (iech1=-1 && iech2=-1)

Parameters
memberType of usage (LHS, RHS or VAR)
modeCovCalcMode structure
iech1Rank of the first sample (or -1)
iech2Rank of the second sample (or -1)
d1

◆ _covtabInit()

void KrigingSystem::_covtabInit ( )
private

◆ _drftabCalcul()

void KrigingSystem::_drftabCalcul ( const ECalcMember &  member,
int  iech 
)
private

◆ _dual()

void KrigingSystem::_dual ( )
private

Extract the valid data Operate the product by the inverse covariance matrix

◆ _estimateCalcul()

void KrigingSystem::_estimateCalcul ( int  status)
private

Calculate the final estimation and storage

Parameters
[in]statusKriging error status

◆ _estimateCalculImage()

void KrigingSystem::_estimateCalculImage ( int  status)
private

◆ _estimateCalculXvalidUnique()

void KrigingSystem::_estimateCalculXvalidUnique ( int  status)
private

◆ _estimateVarZ()

double KrigingSystem::_estimateVarZ ( int  ivarCL,
int  jvarCL 
)
private

Establish the variance of the estimator

Parameters
[in]ivarCLRank of the target variable
[in]jvarCLRank of the auxiliary variable

◆ _flagDefine()

void KrigingSystem::_flagDefine ( )
private

Define the array flag to convert from isotropic to heterotopic case Stores the reduced number of equations in member '_nred'

◆ _getCoefDrift()

double KrigingSystem::_getCoefDrift ( int  ivar,
int  il,
int  ib 
) const
private

◆ _getCOVTAB()

double KrigingSystem::_getCOVTAB ( int  ivar,
int  jvar 
) const
private

◆ _getDISC1()

double KrigingSystem::_getDISC1 ( int  idisc,
int  idim 
) const
private

◆ _getDISC2()

double KrigingSystem::_getDISC2 ( int  idisc,
int  idim 
) const
private

◆ _getDistance()

void KrigingSystem::_getDistance ( int  loc_rank1,
int  loc_rank2,
VectorDouble dd 
) const
private

Update the vector of distances between two samples of two Dbs

Parameters
loc_rank1First Sample Rank in input Db (>=0) or Target (<0)
loc_rank2Second Sample Rank in input Db (>=0) or Target (<0)
ddVector of distances

◆ _getFext()

double KrigingSystem::_getFext ( int  rank,
int  ibfl 
) const
private

Returns the value of the external drift "rank" (if rank >= 0) or of the target (if rank < 0)

Parameters
[in]rankRank of the sample
[in]ibflRank of the external drift

◆ _getFlag()

int KrigingSystem::_getFlag ( int  iech,
int  ivar 
)
private

◆ _getFLAG()

int KrigingSystem::_getFLAG ( int  iech,
int  ivar 
) const
private

◆ _getFlagAddress()

int KrigingSystem::_getFlagAddress ( int  iech0,
int  ivar0 
)
private

◆ _getIdim()

double KrigingSystem::_getIdim ( int  loc_rank,
int  idim 
) const
private

Returns the coordinate of the data (at rank if rank >= 0) or of the target (if rank < 0)

Parameters
[in]loc_rankRank of the sample
[in]idimRank of the coordinate

◆ _getIvar()

double KrigingSystem::_getIvar ( int  rank,
int  ivar 
) const
private

Returns the value of the variable (at rank if rank >= 0) or of the target (if rank < 0)

Parameters
[in]rankRank of the sample
[in]ivarRank of the variable
Remarks
In case of simulation, the variable of the first simulation
is systematically returned. This has no influence on the rest
of the calculations

◆ _getLHS()

double KrigingSystem::_getLHS ( int  iech,
int  ivar,
int  jech,
int  jvar 
) const
private

◆ _getLHSC()

double KrigingSystem::_getLHSC ( int  i,
int  j 
) const
private

◆ _getLHSINV()

double KrigingSystem::_getLHSINV ( int  iech,
int  ivar,
int  jech,
int  jvar 
) const
private

◆ _getMean()

double KrigingSystem::_getMean ( int  ivarCL) const
private

◆ _getNbfl()

int KrigingSystem::_getNbfl ( ) const
private

◆ _getNDisc()

int KrigingSystem::_getNDisc ( ) const
private

◆ _getNFeq()

int KrigingSystem::_getNFeq ( ) const
private

◆ _getNFex()

int KrigingSystem::_getNFex ( ) const
private

◆ _getNVar()

int KrigingSystem::_getNVar ( ) const
private

◆ _getNVarCL()

int KrigingSystem::_getNVarCL ( ) const
private

◆ _getRelativePosition()

VectorInt KrigingSystem::_getRelativePosition ( )
private

◆ _getRHS()

double KrigingSystem::_getRHS ( int  iech,
int  ivar,
int  jvCL 
) const
private

◆ _getRHSC()

double KrigingSystem::_getRHSC ( int  i,
int  jvCL 
) const
private

◆ _getVAR0()

double KrigingSystem::_getVAR0 ( int  ivCL,
int  jvCL 
) const
private

◆ _getVerr()

double KrigingSystem::_getVerr ( int  rank,
int  ivar 
) const
private

Returns the value of the measurement error (at rank if rank >= 0) or of the target (if rank < 0)

Parameters
[in]rankRank of the sample
[in]ivarRank of the variable

◆ _getWGTC()

double KrigingSystem::_getWGTC ( int  i,
int  jvCL 
) const
private

◆ _IND()

int KrigingSystem::_IND ( int  iech,
int  ivar,
int  nech 
) const
private

◆ _isAuthorized()

bool KrigingSystem::_isAuthorized ( )
private

Checks if the number of samples is compatible with the number of drift equations

Returns
Error: 1 if an error is found; 0 otherwise

◆ _isCorrect()

bool KrigingSystem::_isCorrect ( )
private

◆ _isMatCLempty()

bool KrigingSystem::_isMatCLempty ( ) const
private

◆ _krigingDump()

void KrigingSystem::_krigingDump ( int  status)
private

Print the results

Parameters
[in]statusKriging error status

◆ _lhsCalcul()

void KrigingSystem::_lhsCalcul ( )
private

Establish the kriging L.H.S.

◆ _lhsDump()

void KrigingSystem::_lhsDump ( int  nbypas = 5)
private

◆ _lhsInvert()

int KrigingSystem::_lhsInvert ( )
private

◆ _lhsIsoToHetero()

void KrigingSystem::_lhsIsoToHetero ( )
private

◆ _neighCalcul()

void KrigingSystem::_neighCalcul ( int  status,
const VectorDouble tab 
)
private

◆ _prepar()

int KrigingSystem::_prepar ( )
private

Define the array flag[] and the kriging L.H.S.

Returns
The status for the preparation

◆ _prepareForImage()

bool KrigingSystem::_prepareForImage ( const NeighImage neighI)
private

◆ _prepareForImageKriging()

bool KrigingSystem::_prepareForImageKriging ( Db dbaux)
private

◆ _prodCOVTAB()

void KrigingSystem::_prodCOVTAB ( int  ivar,
int  jvar,
double  value 
)
private

◆ _prodLHS()

void KrigingSystem::_prodLHS ( int  iech,
int  ivar,
int  jech,
int  jvar,
double  value 
)
private

◆ _resetMemoryGeneral()

void KrigingSystem::_resetMemoryGeneral ( )
private

◆ _resetMemoryPerNeigh()

void KrigingSystem::_resetMemoryPerNeigh ( )
private

◆ _rhsCalcul()

int KrigingSystem::_rhsCalcul ( )
private

Establish the kriging R.H.S

Remarks
When 'matCL' is provided, 'nvar' stands for the first dimension of
the matrix 'matCL' (its second dimension is equal to model->getNVar()).
Otherwise nvar designates model->getNVar()

◆ _rhsDump()

void KrigingSystem::_rhsDump ( )
private

◆ _rhsIsoToHetero()

void KrigingSystem::_rhsIsoToHetero ( )
private

◆ _saveWeights()

void KrigingSystem::_saveWeights ( int  status)
private

◆ _setCOVTAB()

void KrigingSystem::_setCOVTAB ( int  ivar,
int  jvar,
double  value 
)
private

◆ _setDISC1()

void KrigingSystem::_setDISC1 ( int  idisc,
int  idim,
double  value 
)
private

◆ _setDISC2()

void KrigingSystem::_setDISC2 ( int  idisc,
int  idim,
double  value 
)
private

◆ _setFlag()

void KrigingSystem::_setFlag ( int  iech,
int  ivar,
int  value 
)
private

◆ _setLHS()

void KrigingSystem::_setLHS ( int  iech,
int  ivar,
int  jech,
int  jvar,
double  value,
bool  isForDrift = false 
)
private

Setting the LHS element

Parameters
iechRank of the first sample
ivarRank of the first variable
jechRank of the second sample
jvarRank of the second variable
valueAssigned value
isForDriftTrue is used to set the drift element
Remarks
: When used for setting a Drift element (say in 'i'), then:
: 'iech' is set for 'ib' (which must be within [0,nfeq[) and 'ivar' is set to 'nvar'

◆ _setRHS()

void KrigingSystem::_setRHS ( int  iech,
int  ivar,
int  jvCL,
double  value,
bool  isForDrift = false 
)
private

◆ _setVAR0()

void KrigingSystem::_setVAR0 ( int  ivCL,
int  jvCL,
double  value 
)
private

◆ _simulateCalcul()

void KrigingSystem::_simulateCalcul ( int  status)
private

Calculate the final conditional simulation

Parameters
[in]statusKriging error status

◆ _simulateDump()

void KrigingSystem::_simulateDump ( int  status)
private

◆ _transformGaussianToRaw()

void KrigingSystem::_transformGaussianToRaw ( )
private

Transform the Kriging results from gaussian to raw

Remarks
This procedure is designed for the monovariate case
It assumes that the kriging estimate and variance are already
calculated

◆ _variance()

double KrigingSystem::_variance ( int  ivarCL,
int  jvarCL 
)
private

Establish the calculation of variance or standard deviation

Parameters
[in]ivarCLRank of the target variable
[in]jvarCLRank of the auxiliary variable

◆ _variance0()

void KrigingSystem::_variance0 ( )
private

Establish the constant term for the variance calculation

◆ _wgtCalcul()

void KrigingSystem::_wgtCalcul ( )
private

◆ _wgtDump()

void KrigingSystem::_wgtDump ( int  status)
private

◆ estimate()

int KrigingSystem::estimate ( int  iech_out)

Perform the Kriging of target

Parameters
iech_outRank of the target
Returns

◆ getLHS()

VectorDouble KrigingSystem::getLHS ( ) const
inline

◆ getLHSInv()

VectorDouble KrigingSystem::getLHSInv ( ) const
inline

◆ getLTerm()

double KrigingSystem::getLTerm ( ) const
inline

◆ getNDim()

int KrigingSystem::getNDim ( ) const

◆ getNech()

int KrigingSystem::getNech ( ) const

Returns the number of samples in the neighborhood

Returns
Number of samples
Remarks
If collocated option is switch ON, samples are alreadycount (rank < 0)

◆ getNeq()

int KrigingSystem::getNeq ( ) const

◆ getNRed()

int KrigingSystem::getNRed ( ) const
inline

◆ getRHSC() [1/2]

VectorDouble KrigingSystem::getRHSC ( ) const
inline

◆ getRHSC() [2/2]

VectorDouble KrigingSystem::getRHSC ( int  ivar) const

◆ getSampleCoordinates()

VectorDouble KrigingSystem::getSampleCoordinates ( ) const

Returns the coordinates of the neighboring samples

Returns
Array organized by Coordinate (minor) then by Sample (major)

◆ getSampleData()

VectorDouble KrigingSystem::getSampleData ( ) const

◆ getSampleIndices()

VectorInt KrigingSystem::getSampleIndices ( ) const
inline

◆ getVariance()

VectorDouble KrigingSystem::getVariance ( ) const
inline

◆ getWeights()

VectorDouble KrigingSystem::getWeights ( ) const
inline

◆ getZam()

VectorDouble KrigingSystem::getZam ( ) const
inline

◆ isReady()

bool KrigingSystem::isReady ( )

Performs the last operations before launching the loop on Estimations

Returns

◆ operator=()

KrigingSystem& KrigingSystem::operator= ( const KrigingSystem m)
delete

◆ setKrigOptAnamophosis()

int KrigingSystem::setKrigOptAnamophosis ( AAnam anam)

Perform Gaussian Anamoprhosis kriging

Parameters
anamPointer to the AAnam structure
Returns

◆ setKrigOptBayes()

int KrigingSystem::setKrigOptBayes ( bool  flag_bayes,
const VectorDouble prior_mean,
const VectorDouble prior_cov 
)

◆ setKrigOptCalcul()

int KrigingSystem::setKrigOptCalcul ( const EKrigOpt &  calcul,
const VectorInt ndiscs = VectorInt(),
bool  flag_per_cell = false 
)

◆ setKrigoptCode()

int KrigingSystem::setKrigoptCode ( bool  flag_code)

Define the option for Kriging By Profile

Parameters
flag_codeTrue if the option is switched ON
Returns
Remarks
When the Option for Kriging By Profile is ON, the covariance term in LHS
is incremented by V(iech) when both samples 'iech' and 'jech' have
the same Code.

◆ setKrigOptColCok()

int KrigingSystem::setKrigOptColCok ( const VectorInt rank_colcok)

Check the consistency of the Colocation specification

Returns
Error return code
Parameters
[in]rank_colcokArray of ranks of colocated variables
Remarks
The array 'rank_colcok' (if present) must be dimensioned
to the number of variables in Dbin.
Each element gives the rank of the colocated variable within Dbout
or -1 if not colocated
If the array 'rank_colcok' is absent, colocation option is OFF.
In input, the numbering in ; rank_colcok' starts from 1
In output, the numbering starts from 0

◆ setKrigOptDataWeights()

int KrigingSystem::setKrigOptDataWeights ( int  iptrWeights,
bool  flagSet = true 
)

◆ setKrigOptDGM()

int KrigingSystem::setKrigOptDGM ( bool  flag_dgm,
double  eps = EPSILON6 
)

◆ setKrigOptFactorKriging()

int KrigingSystem::setKrigOptFactorKriging ( bool  flag_factor_kriging)

◆ setKrigOptFlagGlobal()

int KrigingSystem::setKrigOptFlagGlobal ( bool  flag_global)

◆ setKrigOptFlagLTerm()

int KrigingSystem::setKrigOptFlagLTerm ( bool  flag_lterm)

Ask for the specific calculation of Z * A-1 * Z

Parameters
flag_ltermFlag for asking this specific calculation
Returns
Remarks
The calculated value can be retrieved using _getLTerm() method

◆ setKrigOptFlagSimu()

int KrigingSystem::setKrigOptFlagSimu ( bool  flagSimu,
int  nbsimu = 0,
int  rankPGS = -1 
)

◆ setKrigOptMatCL()

int KrigingSystem::setKrigOptMatCL ( const VectorVectorDouble matCL)

Define the output as Linear Combinations of the Input Variables

Parameters
matCLVector of Vectors of weights (see remarks)
Returns
Remarks
The first dimension of 'matCL' is the number of Output variables
The second dimension is the number of input Variables.

◆ setKrigOptSaveWeights()

int KrigingSystem::setKrigOptSaveWeights ( bool  flag_save)

Switch the option for saving the Kriging Weights using Keypair mechanism

Parameters
flag_saveValue of the switch

◆ setKrigOptXValid()

int KrigingSystem::setKrigOptXValid ( bool  flag_xvalid,
bool  flag_kfold,
bool  optionXValidEstim = false,
bool  optionXValidStdev = false,
bool  optionXValidVarZ = false 
)

Set the flag for performing Cross-Validation

Parameters
flag_xvalidTrue if the Cross-Validation option is switched ON
flag_kfoldTrue if the KFold option is switch ON
optionXValidEstimTrue for Z*-Z; False for Z*
optionXValidStdevTrue for (Z*-Z)/S; False for S
optionXValidVarZTrue for Var(Z*)
Returns
Remarks
The KFold option requires a Code to be assigned to each Datum
In the Neighborhood search for a Target sample, some other data points
are discarded:
- either the Target sample itself (Leave-One-Point-Out) if KFold is False
- all samples with same code as Target if KFold is True

◆ updKrigOptCheckAddress()

int KrigingSystem::updKrigOptCheckAddress ( bool  flagCheckAddress)

This function switches ON the systematic test of addresses before running

Parameters
flagCheckAddressTrue if addresses must be systematically checked
Remarks
When turned ON, this option slows the process.
It should only be used for Debugging purposes.

◆ updKrigOptEstim()

int KrigingSystem::updKrigOptEstim ( int  iptrEst,
int  iptrStd,
int  iptrVarZ 
)

Set the calculation options

Parameters
iptrEstUID for storing the estimation(s)
iptrStdUID for storing the Standard deviations(s)
iptrVarZUID for storing the Variance(s) of estimator
Returns
Remarks
If a term must not be calculated, its UID must be negative

◆ updKrigOptIclass()

int KrigingSystem::updKrigOptIclass ( int  index_class,
int  nclasses 
)

◆ updKrigOptNeighOnly()

int KrigingSystem::updKrigOptNeighOnly ( int  iptrNeigh)

Member Data Documentation

◆ _anam

const AAnam* KrigingSystem::_anam
private

◆ _calcul

EKrigOpt KrigingSystem::_calcul
private

Option for Calculation.

◆ _covtab

VectorDouble KrigingSystem::_covtab
mutableprivate

◆ _dbaux

DbGrid* KrigingSystem::_dbaux
private

Option for Estimation based on Image.

◆ _dbin

Db* KrigingSystem::_dbin
private

◆ _dbinUidToBeDeleted

VectorInt KrigingSystem::_dbinUidToBeDeleted
mutableprivate

◆ _dbout

Db* KrigingSystem::_dbout
private

◆ _dboutUidToBeDeleted

VectorInt KrigingSystem::_dboutUidToBeDeleted
mutableprivate

◆ _disc1

VectorDouble KrigingSystem::_disc1
private

◆ _disc2

VectorDouble KrigingSystem::_disc2
private

◆ _drftab

VectorDouble KrigingSystem::_drftab
mutableprivate

◆ _flag

VectorInt KrigingSystem::_flag
mutableprivate

◆ _flagAnam

bool KrigingSystem::_flagAnam
private

Option for Gaussian Kriging.

◆ _flagBayes

bool KrigingSystem::_flagBayes
private

Option for Bayesian.

◆ _flagCheckAddress

bool KrigingSystem::_flagCheckAddress
mutableprivate

Working arrays.

◆ _flagCode

bool KrigingSystem::_flagCode
private

Options complement for neighborhood.

◆ _flagDataChanged

bool KrigingSystem::_flagDataChanged
private

◆ _flagDGM

bool KrigingSystem::_flagDGM
private

Option for Discrete Gaussian Model.

◆ _flagEst

bool KrigingSystem::_flagEst
private

◆ _flagFactorKriging

bool KrigingSystem::_flagFactorKriging
private

Option for (Disjunctive) Kriging of Factor.

◆ _flagGlobal

bool KrigingSystem::_flagGlobal
private

◆ _flagKeypairWeights

bool KrigingSystem::_flagKeypairWeights
private

Option for saving the Weights using Keypair mechanism.

◆ _flagLTerm

bool KrigingSystem::_flagLTerm
private

Option for asking for Z * A-1 * Z.

◆ _flagNeighOnly

bool KrigingSystem::_flagNeighOnly
private

Option for Neighboring test.

◆ _flagPerCell

bool KrigingSystem::_flagPerCell
private

Option for Block estimation.

◆ _flagSet

bool KrigingSystem::_flagSet
private

◆ _flagSimu

bool KrigingSystem::_flagSimu
private

Option for Simulation.

◆ _flagStd

bool KrigingSystem::_flagStd
private

◆ _flagVarZ

bool KrigingSystem::_flagVarZ
private

◆ _flagWeights

bool KrigingSystem::_flagWeights
private

◆ _iechOut

int KrigingSystem::_iechOut
private

Local variables.

◆ _iptrEst

int KrigingSystem::_iptrEst
private

UID for storage.

◆ _iptrNeigh

int KrigingSystem::_iptrNeigh
private

◆ _iptrStd

int KrigingSystem::_iptrStd
private

◆ _iptrVarZ

int KrigingSystem::_iptrVarZ
private

◆ _iptrWeights

int KrigingSystem::_iptrWeights
private

Option for Weights at Data locations.

◆ _isReady

bool KrigingSystem::_isReady
private

◆ _lhs

VectorDouble KrigingSystem::_lhs
mutableprivate

◆ _lhsinv

VectorDouble KrigingSystem::_lhsinv
mutableprivate

◆ _lterm

double KrigingSystem::_lterm
private

◆ _matCL

VectorVectorDouble KrigingSystem::_matCL
private

Option for Estimating the Linear Combination of Variables.

◆ _model

Model* KrigingSystem::_model
private

◆ _modelInit

Model* KrigingSystem::_modelInit
private

◆ _modelSimple

Model* KrigingSystem::_modelSimple
private

◆ _nbgh

VectorInt KrigingSystem::_nbgh
mutableprivate

◆ _nbghWork

NeighWork KrigingSystem::_nbghWork
mutableprivate

◆ _nbsimu

int KrigingSystem::_nbsimu
private

◆ _nclasses

int KrigingSystem::_nclasses
private

◆ _ndiscNumber

int KrigingSystem::_ndiscNumber
private

◆ _ndiscs

VectorInt KrigingSystem::_ndiscs
private

◆ _neighParam

ANeighParam* KrigingSystem::_neighParam
private

◆ _nred

int KrigingSystem::_nred
private

◆ _postCov

VectorDouble KrigingSystem::_postCov
private

◆ _postMean

VectorDouble KrigingSystem::_postMean
private

◆ _postSimu

VectorVectorDouble KrigingSystem::_postSimu
private

◆ _priorCov

VectorDouble KrigingSystem::_priorCov
private

◆ _priorMean

VectorDouble KrigingSystem::_priorMean
private

◆ _rankColCok

VectorInt KrigingSystem::_rankColCok
private

Option for Colocation.

◆ _rankPGS

int KrigingSystem::_rankPGS
private

◆ _rhs

VectorDouble KrigingSystem::_rhs
mutableprivate

◆ _var0

VectorDouble KrigingSystem::_var0
mutableprivate

◆ _varCorrec

VectorDouble KrigingSystem::_varCorrec
private

◆ _wgt

VectorDouble KrigingSystem::_wgt
mutableprivate

◆ _xvalidEstim

bool KrigingSystem::_xvalidEstim
private

Option for Cross_validation.

◆ _xvalidStdev

bool KrigingSystem::_xvalidStdev
private

◆ _xvalidVarZ

bool KrigingSystem::_xvalidVarZ
private

◆ _zam

VectorDouble KrigingSystem::_zam
mutableprivate

The documentation for this class was generated from the following files: