1.3.1
CCC
 
model_auto.cpp File Reference
#include "geoslib_f.h"
#include "geoslib_old_f.h"
#include "Enum/EAnam.hpp"
#include "Enum/EJustify.hpp"
#include "Basic/AException.hpp"
#include "Basic/File.hpp"
#include "Basic/Utilities.hpp"
#include "Basic/String.hpp"
#include "Basic/OptDbg.hpp"
#include "Basic/VectorHelper.hpp"
#include "Covariances/CovAniso.hpp"
#include "Covariances/CovLMCTapering.hpp"
#include "Covariances/CovLMCConvolution.hpp"
#include "Covariances/CovLMCAnamorphosis.hpp"
#include "Model/Option_AutoFit.hpp"
#include "Model/Model.hpp"
#include "Model/Constraints.hpp"
#include "Model/ConsItem.hpp"
#include "Db/Db.hpp"
#include "Db/DbGrid.hpp"
#include "Variogram/Vario.hpp"
#include "Geometry/GeometryHelper.hpp"
#include "Matrix/MatrixSquareGeneral.hpp"
#include <math.h>

Functions

void st_updateAlphaDiag (int icov0, int ivar0, int ncova, int nvar, VectorDouble &xr, VectorDouble &alpha, const VectorDouble &consSill)
 
int model_auto_fit (Vario *vario, Model *model, bool verbose, const Option_AutoFit &mauto_arg, const Constraints &cons_arg, const Option_VarioFit &optvar_arg)
 
int model_fitting_sills (Vario *vario, Model *model, const Constraints &constraints, const Option_AutoFit &mauto)
 
int vmap_auto_fit (const DbGrid *dbmap, Model *model, bool verbose, const Option_AutoFit &mauto_arg, const Constraints &cons_arg, const Option_VarioFit &optvar_arg)
 
void constraints_print (const Constraints &constraints)
 
int modify_constraints_on_sill (Constraints &constraints)
 
double constraints_get (const Constraints &constraints, const EConsType &icase, int igrf, int icov, const EConsElem &icons, int iv1, int iv2)
 

Function Documentation

◆ constraints_get()

double constraints_get ( const Constraints constraints,
const EConsType &  icase,
int  igrf,
int  icov,
const EConsElem &  icons,
int  iv1,
int  iv2 
)

Return the constraint value (if defined) or TEST

Returns
Returned value or TEST
Parameters
[in,out]constraintsConstraints structure
[in]icaseParameter type (EConsType)
[in]igrfRank of the Gaussian Random Function
[in]icovRank of the structure (starting from 0)
[in]iconsType of the constraint (EConsElem)
[in]iv1Rank of the first variable
[in]iv2Rank of the second variable

◆ constraints_print()

void constraints_print ( const Constraints constraints)

Print the Auto Fitting Constraints Structure

Parameters
[in]constraintsConstraints structure

◆ model_auto_fit()

int model_auto_fit ( Vario vario,
Model model,
bool  verbose,
const Option_AutoFit mauto_arg,
const Constraints cons_arg,
const Option_VarioFit optvar_arg 
)

Automatic model fitting

Returns
Error returned code
Parameters
[in]varioVario structure containing the exp. variogram
[in]modelModel structure containing the basic structures
[in]verboseVerbose flag
[in]mauto_argOption_AutoFit structure
[in]cons_argConstraints structure
[in]optvar_argOpt_Vario structure

◆ model_fitting_sills()

int model_fitting_sills ( Vario vario,
Model model,
const Constraints constraints,
const Option_AutoFit mauto 
)

Fitting a model using an experimental variogram

Returns
Error return code
Parameters
[in]varioVario structure
[in,out]modelModel to be fitted
[in]constraintsConstraints structure
[in]mautoOption_AutoFit structure

◆ modify_constraints_on_sill()

int modify_constraints_on_sill ( Constraints constraints)

If a constraint concerns a sill, take its square root as it corresponds to a constraints on AIC (not on a sill directly) due to the fact that it will be processed in FOXLEG (not in GOULARD) This transform only makes sense for MONOVARIATE case (the test should have been performed beforehand)

Returns
Error code (if the sill constraint is negative)
Parameters
[in]constraintsConstraints structure

◆ st_updateAlphaDiag()

void st_updateAlphaDiag ( int  icov0,
int  ivar0,
int  ncova,
int  nvar,
VectorDouble xr,
VectorDouble alpha,
const VectorDouble consSill 
)

Update alpha from xr (diagonal only)

Parameters
[in]icov0Target basic structure
[in]ivar0Target variable
[in]ncovaNumber of basic structures
[in]nvarNumber of variables
[in]xrCurrent vector of sqrt(constraint/(sum of the sills))
[in,out]alphaCurrent auxiliary matrices alpha
[in]consSillVector of constant Sill (optional)

◆ vmap_auto_fit()

int vmap_auto_fit ( const DbGrid dbmap,
Model model,
bool  verbose,
const Option_AutoFit mauto_arg,
const Constraints cons_arg,
const Option_VarioFit optvar_arg 
)

Automatic model fitting

Returns
Error returned code
Parameters
[in]dbmapDb Grid structure containing the Vmap
[in]modelModel structure containing the basic structures
[in]verboseVerbose flag
[in]mauto_argOption_AutoFit structure
[in]cons_argConstraints structure
[in]optvar_argOpt_Vario structure