1.2.1
CCC
 
CalcKriging.cpp File Reference
#include "Db/DbGrid.hpp"
#include "Db/Db.hpp"
#include "Estimation/CalcKriging.hpp"
#include "Estimation/KrigingSystem.hpp"
#include "Basic/OptDbg.hpp"
#include "Model/Model.hpp"
#include <math.h>

Functions

int kriging (Db *dbin, Db *dbout, Model *model, ANeigh *neigh, const EKrigOpt &calcul, bool flag_est, bool flag_std, bool flag_varz, const VectorInt &ndiscs, const VectorInt &rank_colcok, const MatrixRectangular *matLC, const NamingConvention &namconv)
 
int krigcell (Db *dbin, Db *dbout, Model *model, ANeigh *neigh, bool flag_est, bool flag_std, const VectorInt &ndiscs, const VectorInt &rank_colcok, const NamingConvention &namconv)
 
int kribayes (Db *dbin, Db *dbout, Model *model, ANeigh *neigh, const VectorDouble &prior_mean, const MatrixSquareSymmetric &prior_cov, bool flag_est, bool flag_std, const NamingConvention &namconv)
 
int krigprof (Db *dbin, Db *dbout, Model *model, ANeigh *neigh, bool flag_est, bool flag_std, const NamingConvention &namconv)
 
Krigtest_Res krigtest (Db *dbin, Db *dbout, Model *model, ANeigh *neigh, int iech0, const EKrigOpt &calcul, const VectorInt &ndiscs, bool flagPerCell, bool verbose)
 
int kriggam (Db *dbin, Db *dbout, Model *model, ANeigh *neigh, AAnam *anam, const NamingConvention &namconv)
 
int xvalid (Db *db, Model *model, ANeigh *neigh, bool flag_kfold, int flag_xvalid_est, int flag_xvalid_std, int flag_xvalid_varz, const VectorInt &rank_colcok, const NamingConvention &namconv)
 
int test_neigh (Db *dbin, Db *dbout, Model *model, ANeigh *neigh, const NamingConvention &namconv)
 

Function Documentation

int kribayes ( Db dbin,
Db dbout,
Model model,
ANeigh neigh,
const VectorDouble prior_mean,
const MatrixSquareSymmetric prior_cov,
bool  flag_est,
bool  flag_std,
const NamingConvention namconv 
)

Estimation with Bayesian Drift

Returns
Error return code
Parameters
[in]dbininput Db structure
[in]dboutoutput Db structure
[in]modelModel structure
[in]neighANeigh structure
[in]prior_meanArray giving the prior means for the drift terms
[in]prior_covArray containing the prior covariance matrix for the drift terms
[in]flag_estPointer for the storing the estimation
[in]flag_stdPointer for the storing the standard deviation
[in]namconvNaming convention
int krigcell ( Db dbin,
Db dbout,
Model model,
ANeigh neigh,
bool  flag_est,
bool  flag_std,
const VectorInt ndiscs,
const VectorInt rank_colcok,
const NamingConvention namconv 
)

Standard Block Kriging with variable cell dimension

Returns
Error return code
Parameters
[in]dbinInput Db structure
[in]dboutOutput Db structure
[in]modelModel structure
[in]neighANeigh structure
[in]ndiscsArray giving the discretization counts
[in]flag_estOption for the storing the estimation
[in]flag_stdOption for the storing the standard deviation
[in]rank_colcokOption for running Collocated Cokriging
[in]namconvNaming convention
int kriggam ( Db dbin,
Db dbout,
Model model,
ANeigh neigh,
AAnam anam,
const NamingConvention namconv 
)

Punctual Kriging in the Anamorphosed Gaussian Model

Returns
Error return code
Parameters
[in]dbininput Db structure
[in]dboutoutput Db structure
[in]modelModel structure
[in]neighANeigh structure
[in]anamAAnam structure
[in]namconvNaming convention
int kriging ( Db dbin,
Db dbout,
Model model,
ANeigh neigh,
const EKrigOpt &  calcul,
bool  flag_est,
bool  flag_std,
bool  flag_varz,
const VectorInt ndiscs,
const VectorInt rank_colcok,
const MatrixRectangular matLC,
const NamingConvention namconv 
)

Standard Kriging

Returns
Error return code
Parameters
[in]dbinInput Db structure
[in]dboutOutput Db structure
[in]modelModel structure
[in]neighANeigh structure
[in]calculKriging calculation option (EKrigOpt)
[in]ndiscsArray giving the discretization counts
[in]flag_estOption for storing the estimation
[in]flag_stdOption for storing the standard deviation
[in]flag_varzOption for storing the variance of the estimator (only available for stationary model)
[in]rank_colcokOption for running Collocated Cokriging
[in]matLCMatrix of linear combination (or NULL) (Dimension: nvarLC * model->getNVar())
[in]namconvNaming convention
int krigprof ( Db dbin,
Db dbout,
Model model,
ANeigh neigh,
bool  flag_est,
bool  flag_std,
const NamingConvention namconv 
)

Punctual Kriging based on profiles

Returns
Error return code
Parameters
[in]dbininput Db structure
[in]dboutoutput Db structure
[in]modelModel structure
[in]neighANeigh structure
[in]flag_estOption for the storing the estimation
[in]flag_stdOption for the storing the standard deviation
[in]namconvNaming convention
Krigtest_Res krigtest ( Db dbin,
Db dbout,
Model model,
ANeigh neigh,
int  iech0,
const EKrigOpt &  calcul,
const VectorInt ndiscs,
bool  flagPerCell,
bool  verbose 
)

Perform kriging and return the calculation elements

Returns
A Krigtest_Res structure
Parameters
[in]dbininput Db structure
[in]dboutoutput Db structure
[in]modelModel structure
[in]neighANeigh structure
[in]iech0Rank of the target sample
[in]calculKriging calculation option (EKrigOpt)
[in]ndiscsArray giving the discretization counts
[in]flagPerCellUse local block extensions (when defined)
[in]verboseWhen TRUE, the full debugging flag is switched ON (the current status is reset after the run)
int test_neigh ( Db dbin,
Db dbout,
Model model,
ANeigh neigh,
const NamingConvention namconv 
)

Check the Neighborhood

Returns
Error return code (0: success, 1: error)
Parameters
[in]dbininput Db structure
[in]dboutoutput Db structure
[in]modelModel structure (optional)
[in]neighANeigh structure
[in]namconvNaming Convention
Remarks
This procedure creates the following arrays:
1 - The number of selected samples
2 - The maximum neighborhood distance
3 - The minimum neighborhood distance
4 - The number of non-empty sectors
5 - The number of consecutive empty sectors
int xvalid ( Db db,
Model model,
ANeigh neigh,
bool  flag_kfold,
int  flag_xvalid_est,
int  flag_xvalid_std,
int  flag_xvalid_varz,
const VectorInt rank_colcok,
const NamingConvention namconv 
)

Standard Cross-Validation

Parameters
dbDb structure
modelModel structure
neighANeigh structure
flag_kfoldTrue if a code (K-FOLD) is used
flag_xvalid_estOption for storing the estimation: 1 for Z*-Z; -1 for Z*
flag_xvalid_stdOption for storing the standard deviation: 1:for (Z*-Z)/S; -1 for S
flag_xvalid_varzOption for storing the variance of the estimator
rank_colcokOption for running Collocated Cokriging
namconvNaming Convention
Returns
Error return code