#include "geoslib_f.h"
#include "geoslib_old_f.h"
#include "geoslib_define.h"
#include "geoslib_f_private.h"
#include "Variogram/Vario.hpp"
#include "Basic/Utilities.hpp"
#include "Basic/Law.hpp"
#include "Basic/MathFunc.hpp"
#include "Stats/Classical.hpp"
#include "Basic/AException.hpp"
#include "Basic/OptDbg.hpp"
#include "LithoRule/Rule.hpp"
#include "LithoRule/RuleShift.hpp"
#include "LithoRule/RuleProp.hpp"
#include "LithoRule/PropDef.hpp"
#include "Db/Db.hpp"
#include "Model/Model.hpp"
#include "Matrix/MatrixSquareSymmetric.hpp"
#include "Matrix/MatrixFactory.hpp"
#include "Enum/EOperator.hpp"
#include <math.h>
#include <string.h>
Functions | |
void | set_test_discrete (bool flag_discret) |
Vario_Order * | vario_order_manage (int mode, int flag_dist, int size_aux, Vario_Order *vorder) |
int | vario_order_add (Vario_Order *vorder, int iech, int jech, void *aux_iech, void *aux_jech, int ipas, int idir, double dist) |
void | vario_order_print (Vario_Order *vorder, int idir_target, int ipas_target, int verbose) |
Vario_Order * | vario_order_final (Vario_Order *vorder, int *npair) |
void | vario_order_get_indices (Vario_Order *vorder, int ipair, int *iech, int *jech, double *dist) |
void | vario_order_get_auxiliary (Vario_Order *vorder, int ipair, char *aux_iech, char *aux_jech) |
void | vario_order_get_bounds (Vario_Order *vorder, int idir, int ipas, int *ifirst, int *ilast) |
Vario * | model_pgs (Db *db, const VarioParam *varioparam, const RuleProp *ruleprop, const Model *model1, const Model *model2) |
Vario * | variogram_pgs (Db *db, const VarioParam *varioparam, const RuleProp *ruleprop, int flag_rho, int opt_correl) |
Rule * | _rule_auto (Db *db, const VarioParam *varioparam, const RuleProp *ruleprop, int ngrfmax, int verbose) |
Rule* _rule_auto | ( | Db * | db, |
const VarioParam * | varioparam, | ||
const RuleProp * | ruleprop, | ||
int | ngrfmax, | ||
int | verbose | ||
) |
Find the optimal Truncation Scheme from Variopgs score
[in] | db | Db structure |
[in] | varioparam | VarioParam structure for the GRFs |
[in] | ruleprop | RuleProp structure |
[in] | ngrfmax | Maximum number of underlying GRFs (1 or 2) |
[in] | verbose | Verbose flag |
Vario* model_pgs | ( | Db * | db, |
const VarioParam * | varioparam, | ||
const RuleProp * | ruleprop, | ||
const Model * | model1, | ||
const Model * | model2 | ||
) |
Evaluate the experimental variogram of indicators in PluriGaussian case
[in] | db | Db descriptor |
[in] | varioparam | VarioParam structure |
[in] | ruleprop | RuleProp structure |
[in] | model1 | First Model structure |
[in] | model2 | Second Model structure (optional) |
void set_test_discrete | ( | bool | flag_discret | ) |
int vario_order_add | ( | Vario_Order * | vorder, |
int | iech, | ||
int | jech, | ||
void * | aux_iech, | ||
void * | aux_jech, | ||
int | ipas, | ||
int | idir, | ||
double | dist | ||
) |
Add a record to the Variogram Order structure
[in] | vorder | Vario_Order structure |
[in] | iech | Rank of the first sample |
[in] | jech | Rank of the second sample |
[in] | aux_iech | Auxiliary array for sample 'iech' (or NULL) |
[in] | aux_jech | Auxiliary array for sample 'jech' (or NULL) |
[in] | ipas | Rank of the lag |
[in] | idir | Rank of the direction (or 0) |
[in] | dist | Calculated distance (only stored if flag_dist == 1) |
Vario_Order* vario_order_final | ( | Vario_Order * | vorder, |
int * | npair | ||
) |
Resize the array and sort it
[in] | vorder | Vario_Order structure |
[in] | npair | Final number of pairs |
void vario_order_get_auxiliary | ( | Vario_Order * | vorder, |
int | ipair, | ||
char * | aux_iech, | ||
char * | aux_jech | ||
) |
Returns the two auxiliary arrays for a given (ordered) pair
[in] | vorder | Vario_Order structure |
[in] | ipair | Rank of the sorted pair |
[out] | aux_iech | Array to auxiliary information for sample 'iech' |
[out] | aux_jech | Array to auxiliary information for sample 'jech' |
void vario_order_get_bounds | ( | Vario_Order * | vorder, |
int | idir, | ||
int | ipas, | ||
int * | ifirst, | ||
int * | ilast | ||
) |
Returns the first and last indices matching a target lag
[in] | vorder | Vario_Order structure |
[in] | idir | Rank of the target direction |
[in] | ipas | Rank of the target lag |
[out] | ifirst | Rank of the first sample of the lag (included) |
[out] | ilast | Rank of the last sample of the lag (excluded) |
void vario_order_get_indices | ( | Vario_Order * | vorder, |
int | ipair, | ||
int * | iech, | ||
int * | jech, | ||
double * | dist | ||
) |
Returns the two samples for a given (ordered) pair
[in] | vorder | Vario_Order structure |
[in] | ipair | Rank of the sorted pair |
[out] | iech | Rank of the first sample |
[out] | jech | Rank of the second sample |
[out] | dist | Calculated distance or TEST (if flag_dist == 0) |
Vario_Order* vario_order_manage | ( | int | mode, |
int | flag_dist, | ||
int | size_aux, | ||
Vario_Order * | vorder | ||
) |
Manage the Variogram Order structure
[in] | mode | Usage:
|
[in] | flag_dist | 1 if distances are stored; 0 otherwise |
[in] | size_aux | Size (in bytes) of the auxiliary array |
[in] | vorder | Vario_Order structure |
void vario_order_print | ( | Vario_Order * | vorder, |
int | idir_target, | ||
int | ipas_target, | ||
int | verbose | ||
) |
Print the Vario_Order structure
[in] | vorder | Vario_Order structure |
[in] | idir_target | Rank of the target direction (starting from 0) or -1 |
[in] | ipas_target | Rank of the target lag (starting from 0) or -1 |
[in] | verbose | 1 for a complete printout |
Vario* variogram_pgs | ( | Db * | db, |
const VarioParam * | varioparam, | ||
const RuleProp * | ruleprop, | ||
int | flag_rho, | ||
int | opt_correl | ||
) |
Calculate the Gaussian variograms
[in] | db | Db structure |
[in] | varioparam | VarioParam structure for the GRFs |
[in] | ruleprop | RuleProp structure |
[in] | flag_rho | 1 if the correlation coefficient must be regressed |
[in] | opt_correl | 0 full model; 1 symmetrical; 2 residuals |