![]() |
1.7.3
Geostatistics & Machine Learning toolbox | https://gstlearn.org
|
![]() |
Class containing the Covariance part of the Model. More...
#include <ACov.hpp>
Class containing the Covariance part of the Model.
It is the uppermost class of the Covariance Tree and is conceived as simple as possible on purpose (in order to let the user defined its own version if necessary): it must simply be able to return its value between two end-point (see eval method).
It is mainly implemented in CovAniso.hpp or CovAnisoList.hpp
Public Member Functions | |
ACov (const CovContext &ctxt=CovContext()) | |
ACov (const ACov &r) | |
ACov & | operator= (const ACov &r) |
virtual | ~ACov () |
virtual int | getNVar () const |
ACov Interface. | |
virtual bool | isIndexable () const |
bool | isNoStat () const |
virtual void | loadInfoValues () |
const CovContext & | getContext () const |
void | setContext (const CovContext &ctxt) |
void | updateFromContext () |
virtual void | copyCovContext (const CovContext &ctxt) |
void | initFromContext () |
CovContext | getContextCopy () const |
virtual double | eval0 (int ivar=0, int jvar=0, const CovCalcMode *mode=nullptr) const |
Calculate the covariance between two variables for 0-distance (stationary case) | |
double | evalCov (const SpacePoint &p1, const SpacePoint &p2, int ivar=0, int jvar=0, const CovCalcMode *mode=nullptr) const |
Calculate the covariance between two variables and two points (general case) | |
virtual double | evalCovOnSphere (double alpha, int degree=50, bool flagScaleDistance=false, const CovCalcMode *mode=nullptr) const |
virtual VectorDouble | evalSpectrumOnSphere (int n, bool flagNormDistance=false, bool flagCumul=false) const |
virtual double | evalSpectrum (const VectorDouble &freq, int ivar, int jvar) const |
virtual void | updateCovByPoints (int icas1, int iech1, int icas2, int iech2) const |
void | attachNoStatDb (const Db *db) |
virtual bool | isOptimEnabled () const |
Functions linked to Optimization during Covariance calculations. | |
void | optimizationPreProcess (int mode, const std::vector< SpacePoint > &ps) const |
SpacePoint & | optimizationLoadInPlace (int iech, int mode, int rank) const |
void | optimizationPostProcess () const |
void | optimizationSetTarget (SpacePoint &pt) const |
VectorDouble | eval (const std::vector< SpacePoint > &vec_p1, const std::vector< SpacePoint > &vec_p2, int ivar=0, int jvar=0, const CovCalcMode *mode=nullptr) const |
Functions for evaluating Covariances. | |
MatrixSymmetric | eval0Mat (const CovCalcMode *mode=nullptr) const |
MatrixSymmetric | evalCovMat0 (const Db *db, int iech, const KrigOpt &krigopt=KrigOpt()) const |
Functions for evaluating Covariance Matrices either in place or not. | |
MatrixDense | evalCovMat (const Db *db1, const Db *db2=nullptr, int ivar0=-1, int jvar0=-1, const VectorInt &nbgh1=VectorInt(), const VectorInt &nbgh2=VectorInt(), const CovCalcMode *mode=nullptr, bool cleanOptim=true) const |
MatrixSymmetric | evalCovMatSym (const Db *db1, const VectorInt &nbgh1=VectorInt(), int ivar0=-1, const CovCalcMode *mode=nullptr, bool cleanOptim=true) const |
MatrixSparse * | evalCovMatSparse (const Db *db1_arg, const Db *db2_arg=nullptr, int ivar0=-1, int jvar0=-1, const VectorInt &nbgh1=VectorInt(), const VectorInt &nbgh2=VectorInt(), const CovCalcMode *mode=nullptr, bool cleanOptim=true, double eps=EPSILON3) const |
int | evalCovMat0InPlace (MatrixSymmetric &mat, const Db *db, int iech, const KrigOpt &krigopt=KrigOpt()) const |
int | evalCovMatInPlace (MatrixDense &mat, const Db *db1, const Db *db2=nullptr, int ivar0=-1, int jvar0=-1, const VectorInt &nbgh1=VectorInt(), const VectorInt &nbgh2=VectorInt(), const CovCalcMode *mode=nullptr, bool cleanOptim=true) const |
int | evalCovMatSymInPlace (MatrixSymmetric &mat, const Db *db1, const VectorInt &nbgh1=VectorInt(), int ivar0=-1, const CovCalcMode *mode=nullptr, bool cleanOptim=true) const |
int | evalCovMatInPlaceFromIdx (MatrixDense &mat, const Db *db1, const Db *db2, const VectorVectorInt &index1, const VectorVectorInt &index2, const VectorInt &nbgh2=VectorInt(), const CovCalcMode *mode=nullptr, bool cleanOptim=true) const |
int | evalCovMatSymInPlaceFromIdx (MatrixSymmetric &mat, const Db *db1, const VectorVectorInt &index1, const CovCalcMode *mode=nullptr, bool cleanOptim=true) const |
int | evalCovMatRHSInPlaceFromIdx (MatrixDense &mat, const Db *db1, const Db *db2, const VectorVectorInt &index1, const int iech2=-1, const KrigOpt &krigopt=KrigOpt(), bool cleanOptim=true) const |
int | evalCovVecRHSInPlace (vect vect, const Db *db2, const VectorInt &index1, int iech2, const KrigOpt &krigopt, SpacePoint &pin, SpacePoint &pout, VectorDouble &tabwork, double lambda=1.) const |
virtual int | addEvalCovVecRHSInPlace (vect vect, const VectorInt &index1, const int iech2, const KrigOpt &krigopt, SpacePoint &pin, SpacePoint &pout, VectorDouble &tabwork, double lambda=1.) const |
void | eval0CovMatBiPointInPlace (MatrixSymmetric &mat, const CovCalcMode *mode) const |
double | evalIvarIpas (double step, const VectorDouble &dir=VectorDouble(), int ivar=0, int jvar=0, const CovCalcMode *mode=nullptr) const |
double | evalIvarIpasIncr (const VectorDouble &dincr, int ivar=0, int jvar=0, const CovCalcMode *mode=nullptr) const |
VectorDouble | evalIvarNlag (const VectorDouble &vec_step, const VectorDouble &dir=VectorDouble(), int ivar=0, int jvar=0, const CovCalcMode *mode=nullptr) const |
MatrixSquare | evalNvarIpas (double step, const VectorDouble &dir=VectorDouble(), const CovCalcMode *mode=nullptr) const |
MatrixSquare | evalNvarIpasIncr (const VectorDouble &dincr, const CovCalcMode *mode=nullptr) const |
double | evalIsoIvarIpas (double step, int ivar=0, int jvar=0, const CovCalcMode *mode=nullptr) const |
VectorDouble | evalIsoIvarNlag (const VectorDouble &vec_step, int ivar=0, int jvar=0, const CovCalcMode *mode=nullptr) const |
MatrixSquare | evalIsoNvarIpas (double step, const CovCalcMode *mode=nullptr) const |
double | evalCvv (const VectorDouble &ext, const VectorInt &ndisc, const VectorDouble &angles=VectorDouble(), int ivar=0, int jvar=0, const CovCalcMode *mode=nullptr) const |
double | evalCvvShift (const VectorDouble &ext, const VectorInt &ndisc, const VectorDouble &shift, const VectorDouble &angles=VectorDouble(), int ivar=0, int jvar=0, const CovCalcMode *mode=nullptr) const |
MatrixSquare | evalCvvM (const VectorDouble &ext, const VectorInt &ndisc, const VectorDouble &angles=VectorDouble(), const CovCalcMode *mode=nullptr) const |
double | evalCxv (const SpacePoint &p1, const VectorDouble &ext, const VectorInt &ndisc, const VectorDouble &angles=VectorDouble(), const VectorDouble &x0=VectorDouble(), int ivar=0, int jvar=0, const CovCalcMode *mode=nullptr) const |
double | evalCxv (const Db *db, const VectorDouble &ext, const VectorInt &ndisc, const VectorDouble &angles=VectorDouble(), const VectorDouble &x0=VectorDouble(), int ivar=0, int jvar=0, const CovCalcMode *mode=nullptr) const |
MatrixSquare | evalCxvM (const SpacePoint &p1, const VectorDouble &ext, const VectorInt &ndisc, const VectorDouble &angles=VectorDouble(), const VectorDouble &x0=VectorDouble(), const CovCalcMode *mode=nullptr) const |
void | evalPointToDb (VectorDouble &values, const SpacePoint &p1, const Db *db2, int ivar=0, int jvar=0, bool useSel=true, const VectorInt &nbgh2=VectorInt(), const CovCalcMode *mode=nullptr) const |
void | evalPointToDbAsSP (VectorDouble &values, const std::vector< SpacePoint > &p1s, const SpacePoint &p2, int ivar=0, int jvar=0, const CovCalcMode *mode=nullptr) const |
double | evalAverageDbToDb (const Db *db1, const Db *db2, int ivar=0, int jvar=0, double eps=0., int seed=434132, const CovCalcMode *mode=nullptr) const |
double | evalAverageIncrToIncr (const VectorVectorDouble &d1, const VectorVectorDouble &d2, int ivar=0, int jvar=0, const CovCalcMode *mode=nullptr) const |
double | evalAveragePointToDb (const SpacePoint &p1, const Db *db2, int ivar=0, int jvar=0, const CovCalcMode *mode=nullptr) const |
double | extensionVariance (const Db *db, const VectorDouble &ext, const VectorInt &ndisc, const VectorDouble &angles=VectorDouble(), const VectorDouble &x0=VectorDouble(), int ivar=0, int jvar=0) const |
double | samplingDensityVariance (const Db *db, const VectorDouble &ext, const VectorInt &ndisc, const VectorDouble &angles=VectorDouble(), const VectorDouble &x0=VectorDouble(), int ivar=0, int jvar=0) const |
double | specificVolume (const Db *db, double mean, const VectorDouble &ext, const VectorInt &ndisc, const VectorDouble &angles=VectorDouble(), const VectorDouble &x0=VectorDouble(), int ivar=0, int jvar=0) const |
double | coefficientOfVariation (const Db *db, double volume, double mean, const VectorDouble &ext, const VectorInt &ndisc, const VectorDouble &angles=VectorDouble(), const VectorDouble &x0=VectorDouble(), int ivar=0, int jvar=0) const |
double | specificVolumeFromCoV (Db *db, double cov, double mean, const VectorDouble &ext, const VectorInt &ndisc, const VectorDouble &angles=VectorDouble(), const VectorDouble &x0=VectorDouble(), int ivar=0, int jvar=0) const |
double | evaluateOneGeneric (const CovInternal *covint, const VectorDouble &d1=VectorDouble(), double weight=1., const CovCalcMode *mode=nullptr) const |
double | calculateStDev (Db *db1, int iech1, Db *db2, int iech2, bool verbose=false, double factor=1., const CovCalcMode *mode=nullptr) const |
void | evaluateMatInPlace (const CovInternal *covint, const VectorDouble &d1, MatrixSquare &covtab, bool flag_init=false, double weight=1., const CovCalcMode *mode=nullptr) const |
VectorDouble | evaluateFromDb (Db *db, int ivar=0, int jvar=0, const CovCalcMode *mode=nullptr) const |
double | evaluateOneIncr (double hh, const VectorDouble &codir=VectorDouble(), int ivar=0, int jvar=0, const CovCalcMode *mode=nullptr) const |
VectorDouble | sample (const VectorDouble &h, const VectorDouble &codir=VectorDouble(), int ivar=0, int jvar=0, const CovCalcMode *mode=nullptr, const CovInternal *covint=nullptr) const |
VectorDouble | sampleUnitary (const VectorDouble &hh, int ivar=0, int jvar=0, VectorDouble codir=VectorDouble(), const CovCalcMode *mode=nullptr) const |
VectorDouble | envelop (const VectorDouble &hh, int ivar=0, int jvar=0, int isign=1, VectorDouble codir=VectorDouble(), const CovCalcMode *mode=nullptr) const |
int | buildVmapOnDbGrid (DbGrid *dbgrid, const NamingConvention &namconv=NamingConvention("VMAP")) const |
double | gofToVario (const Vario *vario, bool verbose=true) const |
void | manage (const Db *db1, const Db *db2) const |
void | load (const SpacePoint &p, bool case1) const |
virtual void | updateCovByMesh (int imesh, bool aniso=true) const |
virtual double | getValue (const EConsElem &econs, int iv1, int iv2) const |
void | makeStationary () |
virtual int | makeElemNoStat (const EConsElem &econs, int iv1, int iv2, const AFunctional *func=nullptr, const Db *db=nullptr, const String &namecol=String()) |
void | createNoStatTab () |
void | informMeshByMesh (const AMesh *amesh) const |
void | informMeshByApex (const AMesh *amesh) const |
VectorDouble | informCoords (const VectorVectorDouble &coords, const EConsElem &econs, int iv1=0, int iv2=0) const |
void | informDbIn (const Db *dbin) const |
void | informDbOut (const Db *dbout) const |
virtual void | updateCovByPoints (int icas1, int iech1, int icas2, int iech2) |
int | getNDim (int ispace=-1) const |
void | optimizationPreProcessForData (const Db *db1=nullptr) const |
virtual void | setOptimEnabled (bool enabled) const |
bool | checkAndManageNoStatDb (const Db *db, const String &namecol) |
std::shared_ptr< const Db > | getDbNoStat () const |
const Db * | getDbNoStatRaw () const |
void | setNoStatDbIfNecessary (const Db *db) |
void | setNoStatDbIfNecessary (std::shared_ptr< const Db > &db) |
![]() | |
ASpaceObject (const ASpaceSharedPtr &space=ASpaceSharedPtr()) | |
ASpaceObject (const ASpaceObject &r) | |
ASpaceObject & | operator= (const ASpaceObject &r) |
virtual | ~ASpaceObject () |
virtual String | toString (const AStringFormat *strfmt=nullptr) const override |
AStringable interface. | |
ASpaceSharedPtr | getSpace () const |
Accessor to the current object space context. | |
bool | isConsistent () const |
Indicate if I am consistent with my current space context. | |
VectorDouble | getUnitaryVector () const |
Return unitary vector for the current space context. | |
bool | isConsistent (const ASpaceSharedPtr &space) const |
Indicate if I am consistent with the provided space. | |
virtual bool | isConsistent (const ASpace *space) const =0 |
unsigned int | getNDim (int ispace=-1) const |
Shortcuts to ASpace methods. | |
const VectorDouble & | getOrigin (int ispace=-1) const |
Return the current space context origin coordinates. | |
double | getDistance (const SpacePoint &p1, const SpacePoint &p2, int ispace=0) const |
Return the distance between two space points for the current space context. | |
VectorDouble | getDistances (const SpacePoint &p1, const SpacePoint &p2) const |
Return all the distances (space composits) between two space points for the current space context. | |
VectorDouble | getIncrement (const SpacePoint &p1, const SpacePoint &p2, int ispace=0) const |
Return the increment vector between two space points for the current space context. | |
![]() | |
AStringable () | |
AStringable (const AStringable &r) | |
AStringable & | operator= (const AStringable &r) |
virtual | ~AStringable () |
virtual void | display (const AStringFormat *strfmt=nullptr) const final |
virtual void | display (int level) const final |
![]() | |
ICloneable () | |
virtual | ~ICloneable () |
virtual ICloneable * | clone () const =0 |
Static Public Member Functions | |
static void | gofDisplay (double gof, bool byValue=true, const VectorDouble &thresholds={2., 5., 10., 100}) |
ACov::ACov | ( | const CovContext & | ctxt = CovContext() | ) |
ACov::ACov | ( | const ACov & | r | ) |
|
virtual |
|
virtual |
void ACov::attachNoStatDb | ( | const Db * | db | ) |
int ACov::buildVmapOnDbGrid | ( | DbGrid * | dbgrid, |
const NamingConvention & | namconv = NamingConvention("VMAP") |
||
) | const |
double ACov::calculateStDev | ( | Db * | db1, |
int | iech1, | ||
Db * | db2, | ||
int | iech2, | ||
bool | verbose = false , |
||
double | factor = 1. , |
||
const CovCalcMode * | mode = nullptr |
||
) | const |
Returns the standard deviation at a given increment for a given model between two samples of two Dbs
[in] | db1 | First Db |
[in] | iech1 | Rank in the first Db |
[in] | db2 | Second Db |
[in] | iech2 | Rank in the second Db |
[in] | verbose | Verbose flag |
[in] | factor | Multiplicative factor for standard deviation |
[in] | mode | CovCalcMode structure |
double ACov::coefficientOfVariation | ( | const Db * | db, |
double | volume, | ||
double | mean, | ||
const VectorDouble & | ext, | ||
const VectorInt & | ndisc, | ||
const VectorDouble & | angles = VectorDouble() , |
||
const VectorDouble & | x0 = VectorDouble() , |
||
int | ivar = 0 , |
||
int | jvar = 0 |
||
) | const |
Calculate the Coefficient of Variation
db | Set of data points |
volume | Specific production volume |
mean | Value of the Mean |
ext | Target Block extension |
ndisc | Vector of discretization |
angles | Optional rotation angle for block |
x0 | Optional origin of the Block |
ivar | Rank of the first variable |
jvar | Rank of the second variable |
|
inlinevirtual |
Reimplemented in CovList.
void ACov::createNoStatTab | ( | ) |
VectorDouble ACov::envelop | ( | const VectorDouble & | hh, |
int | ivar = 0 , |
||
int | jvar = 0 , |
||
int | isign = 1 , |
||
VectorDouble | codir = VectorDouble() , |
||
const CovCalcMode * | mode = nullptr |
||
) | const |
VectorDouble ACov::eval | ( | const std::vector< SpacePoint > & | vec_p1, |
const std::vector< SpacePoint > & | vec_p2, | ||
int | ivar = 0 , |
||
int | jvar = 0 , |
||
const CovCalcMode * | mode = nullptr |
||
) | const |
Functions for evaluating Covariances.
|
virtual |
Calculate the covariance between two variables for 0-distance (stationary case)
Reimplemented in CovAniso, CovAnisoList, CovGradientNumerical, CovList, CovLMCAnamorphosis, CovLMCConvolution, and CovLMCTapering.
void ACov::eval0CovMatBiPointInPlace | ( | MatrixSymmetric & | mat, |
const CovCalcMode * | mode | ||
) | const |
Calculate the Matrix of covariance for zero distance
mat | Covariance matrix (Dimension: nvar * nvar) |
mode | Calculation Options |
MatrixSymmetric ACov::eval0Mat | ( | const CovCalcMode * | mode = nullptr | ) | const |
double ACov::evalAverageDbToDb | ( | const Db * | db1, |
const Db * | db2, | ||
int | ivar = 0 , |
||
int | jvar = 0 , |
||
double | eps = 0. , |
||
int | seed = 434132 , |
||
const CovCalcMode * | mode = nullptr |
||
) | const |
Calculate the (weighted) average Covariance between samples of two Dbs, for a pair of variables
db1 | Pointer to the first Db |
db2 | Pointer to the second Db |
ivar | Rank of the first variables |
jvar | Rank of the second variable |
eps | Epsilon used for randomization in calculation of CVV (optional) |
seed | Seed for the randomization |
mode | CovCalcMode structure |
double ACov::evalAverageIncrToIncr | ( | const VectorVectorDouble & | d1, |
const VectorVectorDouble & | d2, | ||
int | ivar = 0 , |
||
int | jvar = 0 , |
||
const CovCalcMode * | mode = nullptr |
||
) | const |
double ACov::evalAveragePointToDb | ( | const SpacePoint & | p1, |
const Db * | db2, | ||
int | ivar = 0 , |
||
int | jvar = 0 , |
||
const CovCalcMode * | mode = nullptr |
||
) | const |
Calculate the (weighted) average Covariance between a point and a Db for a pair of variables
p1 | Point location |
db2 | Pointer to the second Db |
ivar | Rank of the first variables |
jvar | Rank of the second variable |
mode | CovCalcMode structure |
double ACov::evalCov | ( | const SpacePoint & | p1, |
const SpacePoint & | p2, | ||
int | ivar = 0 , |
||
int | jvar = 0 , |
||
const CovCalcMode * | mode = nullptr |
||
) | const |
Calculate the covariance between two variables and two points (general case)
MatrixDense ACov::evalCovMat | ( | const Db * | db1, |
const Db * | db2 = nullptr , |
||
int | ivar0 = -1 , |
||
int | jvar0 = -1 , |
||
const VectorInt & | nbgh1 = VectorInt() , |
||
const VectorInt & | nbgh2 = VectorInt() , |
||
const CovCalcMode * | mode = nullptr , |
||
bool | cleanOptim = true |
||
) | const |
Establish the covariance matrix between two Dbs Takes into account selection and heterotopy
[in] | db1 | First Db |
[in] | db2 | Second Db (= db1 if absent) |
[in] | ivar0 | Rank of the first variable (-1 for all variables) |
[in] | jvar0 | Rank of the second variable (-1 for all variables) |
[in] | nbgh1 | Vector of indices of active samples in db1 (optional) |
[in] | nbgh2 | Vector of indices of active samples in db2 (optional) |
[in] | mode | CovCalcMode structure |
[in] | cleanOptim | When True, clean optimization internal when ended |
MatrixSymmetric ACov::evalCovMat0 | ( | const Db * | db, |
int | iech, | ||
const KrigOpt & | krigopt = KrigOpt() |
||
) | const |
Functions for evaluating Covariance Matrices either in place or not.
int ACov::evalCovMat0InPlace | ( | MatrixSymmetric & | mat, |
const Db * | db, | ||
int | iech, | ||
const KrigOpt & | krigopt = KrigOpt() |
||
) | const |
int ACov::evalCovMatInPlace | ( | MatrixDense & | mat, |
const Db * | db1, | ||
const Db * | db2 = nullptr , |
||
int | ivar0 = -1 , |
||
int | jvar0 = -1 , |
||
const VectorInt & | nbgh1 = VectorInt() , |
||
const VectorInt & | nbgh2 = VectorInt() , |
||
const CovCalcMode * | mode = nullptr , |
||
bool | cleanOptim = true |
||
) | const |
int ACov::evalCovMatInPlaceFromIdx | ( | MatrixDense & | mat, |
const Db * | db1, | ||
const Db * | db2, | ||
const VectorVectorInt & | index1, | ||
const VectorVectorInt & | index2, | ||
const VectorInt & | nbgh2 = VectorInt() , |
||
const CovCalcMode * | mode = nullptr , |
||
bool | cleanOptim = true |
||
) | const |
int ACov::evalCovMatRHSInPlaceFromIdx | ( | MatrixDense & | mat, |
const Db * | db1, | ||
const Db * | db2, | ||
const VectorVectorInt & | index1, | ||
const int | iech2 = -1 , |
||
const KrigOpt & | krigopt = KrigOpt() , |
||
bool | cleanOptim = true |
||
) | const |
Establish covariance matrix between one Db and one sample of a Target Db
[in] | mat | Matrix (possibly resized) |
[in] | db1 | First Db |
[in] | db2 | Second Db |
[in] | index1 | Vector of vector indices of active samples in db1 |
[in] | iech2 | Sample rank within db2 |
[in] | krigopt | KrigOpt structure |
[in] | cleanOptim | When True, clean optimization internal when ended |
MatrixSparse * ACov::evalCovMatSparse | ( | const Db * | db1, |
const Db * | db2 = nullptr , |
||
int | ivar0 = -1 , |
||
int | jvar0 = -1 , |
||
const VectorInt & | nbgh1 = VectorInt() , |
||
const VectorInt & | nbgh2 = VectorInt() , |
||
const CovCalcMode * | mode = nullptr , |
||
bool | cleanOptim = true , |
||
double | eps = EPSILON3 |
||
) | const |
Establish the covariance matrix between two Dbs where samples are selected by ranks The output is stored in a Sparse Matrix
[in] | db1 | First Db |
[in] | db2 | Second Db |
[in] | ivar0 | Rank of the first variable (-1: all variables) |
[in] | jvar0 | Rank of the second variable (-1: all variables) |
[in] | nbgh1 | Array giving ranks of selected samples (optional) |
[in] | nbgh2 | Array giving ranks of selected samples (optional) |
[in] | mode | CovCalcMode structure |
[in] | cleanOptim | When True, clean optimization internal when ended |
[in] | eps | Tolerance for discarding a covariance value |
MatrixSymmetric ACov::evalCovMatSym | ( | const Db * | db1, |
const VectorInt & | nbgh1 = VectorInt() , |
||
int | ivar0 = -1 , |
||
const CovCalcMode * | mode = nullptr , |
||
bool | cleanOptim = true |
||
) | const |
Establish the covariance matrix within a Db Takes into account selection and heterotopy This method takes advantage of calculating covariance between a Db and itself
[in] | db1 | First Db |
[in] | ivar0 | Rank of the first variable (-1 for all variables) |
[in] | nbgh1 | Vector of indices of active samples in db1 (optional) |
[in] | mode | CovCalcMode structure |
[in] | cleanOptim | When True, clean optimization internal arrays at end |
int ACov::evalCovMatSymInPlace | ( | MatrixSymmetric & | mat, |
const Db * | db1, | ||
const VectorInt & | nbgh1 = VectorInt() , |
||
int | ivar0 = -1 , |
||
const CovCalcMode * | mode = nullptr , |
||
bool | cleanOptim = true |
||
) | const |
int ACov::evalCovMatSymInPlaceFromIdx | ( | MatrixSymmetric & | mat, |
const Db * | db1, | ||
const VectorVectorInt & | index1, | ||
const CovCalcMode * | mode = nullptr , |
||
bool | cleanOptim = true |
||
) | const |
|
inlinevirtual |
int ACov::evalCovVecRHSInPlace | ( | vect | vect, |
const Db * | db2, | ||
const VectorInt & | index1, | ||
int | iech2, | ||
const KrigOpt & | krigopt, | ||
SpacePoint & | pin, | ||
SpacePoint & | pout, | ||
VectorDouble & | tabwork, | ||
double | lambda = 1. |
||
) | const |
double ACov::evalCvv | ( | const VectorDouble & | ext, |
const VectorInt & | ndisc, | ||
const VectorDouble & | angles = VectorDouble() , |
||
int | ivar = 0 , |
||
int | jvar = 0 , |
||
const CovCalcMode * | mode = nullptr |
||
) | const |
Average covariance over a block
ext | Vector of Block extensions |
ndisc | Vector of Block discretization |
angles | Vector of rotation angles |
ivar | Rank of the first variable |
jvar | Rank of the second variable |
mode | CovCalcMode structure |
MatrixSquare ACov::evalCvvM | ( | const VectorDouble & | ext, |
const VectorInt & | ndisc, | ||
const VectorDouble & | angles = VectorDouble() , |
||
const CovCalcMode * | mode = nullptr |
||
) | const |
double ACov::evalCvvShift | ( | const VectorDouble & | ext, |
const VectorInt & | ndisc, | ||
const VectorDouble & | shift, | ||
const VectorDouble & | angles = VectorDouble() , |
||
int | ivar = 0 , |
||
int | jvar = 0 , |
||
const CovCalcMode * | mode = nullptr |
||
) | const |
Average covariance between a block and the same block shifted
ext | Vector of Block extensions |
ndisc | Vector of Block discretization |
angles | Vector of rotation angles |
shift | Shift between the two blocks |
ivar | Rank of the first variable |
jvar | Rank of the second variable |
mode | CovCalcMode structure |
double ACov::evalCxv | ( | const Db * | db, |
const VectorDouble & | ext, | ||
const VectorInt & | ndisc, | ||
const VectorDouble & | angles = VectorDouble() , |
||
const VectorDouble & | x0 = VectorDouble() , |
||
int | ivar = 0 , |
||
int | jvar = 0 , |
||
const CovCalcMode * | mode = nullptr |
||
) | const |
double ACov::evalCxv | ( | const SpacePoint & | p1, |
const VectorDouble & | ext, | ||
const VectorInt & | ndisc, | ||
const VectorDouble & | angles = VectorDouble() , |
||
const VectorDouble & | x0 = VectorDouble() , |
||
int | ivar = 0 , |
||
int | jvar = 0 , |
||
const CovCalcMode * | mode = nullptr |
||
) | const |
Average covariance over a block
p1 | Point location |
ext | Vector of Block extensions |
ndisc | Vector of Block discretization |
angles | Vector of rotation angles |
x0 | Vector for origin of block |
ivar | Rank of the first variable |
jvar | Rank of the second variable |
mode | CovCalcMode structure |
MatrixSquare ACov::evalCxvM | ( | const SpacePoint & | p1, |
const VectorDouble & | ext, | ||
const VectorInt & | ndisc, | ||
const VectorDouble & | angles = VectorDouble() , |
||
const VectorDouble & | x0 = VectorDouble() , |
||
const CovCalcMode * | mode = nullptr |
||
) | const |
double ACov::evalIsoIvarIpas | ( | double | step, |
int | ivar = 0 , |
||
int | jvar = 0 , |
||
const CovCalcMode * | mode = nullptr |
||
) | const |
Covariance for a given unit global distance (without anisotropy) for a pair of variables and a single step
ivar | Rank of the first variable |
jvar | Rank of the second variable |
step | Step value |
mode | CovCalcMode structure |
TODO : Not true whatever the space
VectorDouble ACov::evalIsoIvarNlag | ( | const VectorDouble & | vec_step, |
int | ivar = 0 , |
||
int | jvar = 0 , |
||
const CovCalcMode * | mode = nullptr |
||
) | const |
Covariance for a given unit global distance (without anisotropy) for a pair of variables and a set of steps
ivar | |
jvar | |
vec_step | |
mode |
MatrixSquare ACov::evalIsoNvarIpas | ( | double | step, |
const CovCalcMode * | mode = nullptr |
||
) | const |
Covariance for a given unit global distance (without anisotropy) for a set of variables and a single step
step | Step value |
mode | CovCalcMode structure |
double ACov::evalIvarIpas | ( | double | step, |
const VectorDouble & | dir = VectorDouble() , |
||
int | ivar = 0 , |
||
int | jvar = 0 , |
||
const CovCalcMode * | mode = nullptr |
||
) | const |
Covariance from a given point (center) in a given direction (dir *step)
ivar | Rank of the first variable |
jvar | Rank of the second variable |
step | Step value |
dir | Direction definition |
mode | CovCalcMode structure |
double ACov::evalIvarIpasIncr | ( | const VectorDouble & | dincr, |
int | ivar = 0 , |
||
int | jvar = 0 , |
||
const CovCalcMode * | mode = nullptr |
||
) | const |
VectorDouble ACov::evalIvarNlag | ( | const VectorDouble & | vec_step, |
const VectorDouble & | dir = VectorDouble() , |
||
int | ivar = 0 , |
||
int | jvar = 0 , |
||
const CovCalcMode * | mode = nullptr |
||
) | const |
Covariance vector from a given point (center) in a given direction (dir * steps) for a pair of variables and a set of steps
ivar | Rank of the first variable |
jvar | Rank of the second variable |
vec_step | Vector of step values |
dir | Direction definition |
mode | CovCalcMode structure |
MatrixSquare ACov::evalNvarIpas | ( | double | step, |
const VectorDouble & | dir = VectorDouble() , |
||
const CovCalcMode * | mode = nullptr |
||
) | const |
Covariance Matrix from a given point (center) in a given direction (dir * step) for a set of variables and a given step
step | Step value |
dir | Direction definition |
mode | CovCalcMode structure |
MatrixSquare ACov::evalNvarIpasIncr | ( | const VectorDouble & | dincr, |
const CovCalcMode * | mode = nullptr |
||
) | const |
void ACov::evalPointToDb | ( | VectorDouble & | values, |
const SpacePoint & | p1, | ||
const Db * | db2, | ||
int | ivar = 0 , |
||
int | jvar = 0 , |
||
bool | useSel = true , |
||
const VectorInt & | nbgh2 = VectorInt() , |
||
const CovCalcMode * | mode = nullptr |
||
) | const |
Calculate the Covariance vector between a Point and all the samples of a Db, for a pair of variables
values | Array of returned values (possible resized) |
p1 | Point location |
db2 | Pointer to the second Db |
ivar | Rank of the first variables |
jvar | Rank of the second variable |
useSel | When TRUE, the returned vector is reduced to active samples Otherwise, returns TEST for masked samples |
nbgh2 | Vector of indices of active samples in db2 (optional) |
mode | CovCalcMode structure |
void ACov::evalPointToDbAsSP | ( | VectorDouble & | values, |
const std::vector< SpacePoint > & | p1s, | ||
const SpacePoint & | p2, | ||
int | ivar = 0 , |
||
int | jvar = 0 , |
||
const CovCalcMode * | mode = nullptr |
||
) | const |
|
inlinevirtual |
|
inlinevirtual |
VectorDouble ACov::evaluateFromDb | ( | Db * | db, |
int | ivar = 0 , |
||
int | jvar = 0 , |
||
const CovCalcMode * | mode = nullptr |
||
) | const |
Evaluate the model on a Db
[in] | db | Db structure |
[in] | ivar | Rank of the first variable |
[in] | jvar | Rank of the second variable |
[in] | mode | CovCalcMode structure |
void ACov::evaluateMatInPlace | ( | const CovInternal * | covint, |
const VectorDouble & | d1, | ||
MatrixSquare & | covtab, | ||
bool | flag_init = false , |
||
double | weight = 1. , |
||
const CovCalcMode * | mode = nullptr |
||
) | const |
Returns the covariances for an increment This is the generic internal function It can be called for stationary or non-stationary case
[in] | covint | Internal structure for non-stationarityAddress for the next term after the drift or NULL (for stationary case) |
[in] | mode | CovCalcMode structure |
[in] | flag_init | Initialize the array beforehand |
[in] | weight | Multiplicative weight |
[in] | d1 | Distance vector |
[out] | covtab | Covariance array |
double ACov::evaluateOneGeneric | ( | const CovInternal * | covint, |
const VectorDouble & | d1 = VectorDouble() , |
||
double | weight = 1. , |
||
const CovCalcMode * | mode = nullptr |
||
) | const |
Returns the covariance for an increment This is the generic internal function It can be called for stationary or non-stationary case
[in] | covint | Internal structure for non-stationarityAddress for the next term after the drift or NULL (for stationary case) |
[in] | mode | CovCalcMode structure |
[in] | weight | Multiplicative weight |
[in] | d1 | Distance vector |
double ACov::evaluateOneIncr | ( | double | hh, |
const VectorDouble & | codir = VectorDouble() , |
||
int | ivar = 0 , |
||
int | jvar = 0 , |
||
const CovCalcMode * | mode = nullptr |
||
) | const |
Calculate the value of the model for a set of distances
[in] | ivar | Rank of the first variable |
[in] | jvar | Rank of the second variable |
[in] | mode | CovCalcMode structure |
[in] | codir | Array giving the direction coefficients (optional) |
[in] | hh | Vector of increments |
double ACov::extensionVariance | ( | const Db * | db, |
const VectorDouble & | ext, | ||
const VectorInt & | ndisc, | ||
const VectorDouble & | angles = VectorDouble() , |
||
const VectorDouble & | x0 = VectorDouble() , |
||
int | ivar = 0 , |
||
int | jvar = 0 |
||
) | const |
Variance of Extension of a set of points and the block
db | Reference Data Base |
ext | Vector giving the extensions of the target block |
ndisc | Vector giving the discretization |
angles | Vector for the rotation angles of the block (optional) |
x0 | Optional origin of the Block |
ivar | Rank of the first variable |
jvar | Rank of the second variable |
|
inline |
|
inline |
std::shared_ptr< const Db > ACov::getDbNoStat | ( | ) | const |
const Db * ACov::getDbNoStatRaw | ( | ) | const |
|
inline |
|
inlinevirtual |
ACov Interface.
Reimplemented in CorAniso, CorGneiting, CorMatern, CovAnisoList, CovBase, and CovList.
|
inlinevirtual |
|
static |
Printout of statement concerning the Quality of the GOF
gof | Value of the Gof |
byValue | true: display GOF value; false: print its quality level |
thresholds | Vector giving the Quality thresholds |
double ACov::gofToVario | ( | const Vario * | vario, |
bool | verbose = true |
||
) | const |
Evaluate the Goodness-of_fit of the Model on the Experimental Variogram It is expressed as the average departure between Model and Variogram scaled to the variance. As this variance may be poorly calculated (< gmax / 5), it may be replaced by the largest value (gmax) divided by 2 (highly non_stationary cases).
vario | Experimental variogram |
verbose | Verbose flag |
VectorDouble ACov::informCoords | ( | const VectorVectorDouble & | coords, |
const EConsElem & | econs, | ||
int | iv1 = 0 , |
||
int | iv2 = 0 |
||
) | const |
void ACov::informDbIn | ( | const Db * | dbin | ) | const |
void ACov::informDbOut | ( | const Db * | dbout | ) | const |
void ACov::informMeshByApex | ( | const AMesh * | amesh | ) | const |
void ACov::informMeshByMesh | ( | const AMesh * | amesh | ) | const |
|
inline |
|
inlinevirtual |
Reimplemented in CovAnisoList, and CovList.
|
inline |
|
inlinevirtual |
Functions linked to Optimization during Covariance calculations.
void ACov::load | ( | const SpacePoint & | p, |
bool | case1 | ||
) | const |
|
inlinevirtual |
Reimplemented in CovBase.
|
virtual |
void ACov::makeStationary | ( | ) |
SpacePoint & ACov::optimizationLoadInPlace | ( | int | iech, |
int | mode, | ||
int | rank | ||
) | const |
void ACov::optimizationPostProcess | ( | ) | const |
void ACov::optimizationPreProcess | ( | int | mode, |
const std::vector< SpacePoint > & | ps | ||
) | const |
void ACov::optimizationPreProcessForData | ( | const Db * | db1 = nullptr | ) | const |
void ACov::optimizationSetTarget | ( | SpacePoint & | pt | ) | const |
VectorDouble ACov::sample | ( | const VectorDouble & | h, |
const VectorDouble & | codir = VectorDouble() , |
||
int | ivar = 0 , |
||
int | jvar = 0 , |
||
const CovCalcMode * | mode = nullptr , |
||
const CovInternal * | covint = nullptr |
||
) | const |
Calculate the value of the model for a set of distances
[in] | ivar | Rank of the first variable |
[in] | jvar | Rank of the second variable |
[in] | codir | Array giving the direction coefficients (optional) |
[in] | h | Vector of increments |
[in] | mode | CovCalcMode structure |
[in] | covint | Non-stationary parameters |
VectorDouble ACov::sampleUnitary | ( | const VectorDouble & | hh, |
int | ivar = 0 , |
||
int | jvar = 0 , |
||
VectorDouble | codir = VectorDouble() , |
||
const CovCalcMode * | mode = nullptr |
||
) | const |
Returns the value of the normalized covariance (by the variance/covariance value) for a given pair of variables
hh | Vector of distances |
ivar | Rank of the first variable |
jvar | Rank of the second variable |
codir | Direction coefficients |
mode | CovCalcMode structure |
double ACov::samplingDensityVariance | ( | const Db * | db, |
const VectorDouble & | ext, | ||
const VectorInt & | ndisc, | ||
const VectorDouble & | angles = VectorDouble() , |
||
const VectorDouble & | x0 = VectorDouble() , |
||
int | ivar = 0 , |
||
int | jvar = 0 |
||
) | const |
Calculate the Sampling Density Variance
db | Set of data points |
ext | Block extension |
ndisc | Discretization |
angles | Optional rotation angles for the Block |
x0 | Optional origin of the block |
ivar | Rank of the first variable |
jvar | Rank of the second variable |
void ACov::setContext | ( | const CovContext & | ctxt | ) |
void ACov::setNoStatDbIfNecessary | ( | const Db * | db | ) |
void ACov::setNoStatDbIfNecessary | ( | std::shared_ptr< const Db > & | db | ) |
|
inlinevirtual |
double ACov::specificVolume | ( | const Db * | db, |
double | mean, | ||
const VectorDouble & | ext, | ||
const VectorInt & | ndisc, | ||
const VectorDouble & | angles = VectorDouble() , |
||
const VectorDouble & | x0 = VectorDouble() , |
||
int | ivar = 0 , |
||
int | jvar = 0 |
||
) | const |
Calculate the Specific Volume
db | Set of data points |
mean | Value of the Mean |
ext | Target Block extension |
ndisc | Vector of discretization |
angles | Optional rotation angle for block |
x0 | Optional origin of the Block |
ivar | Rank of the first variable |
jvar | Rank of the second variable |
double ACov::specificVolumeFromCoV | ( | Db * | db, |
double | cov, | ||
double | mean, | ||
const VectorDouble & | ext, | ||
const VectorInt & | ndisc, | ||
const VectorDouble & | angles = VectorDouble() , |
||
const VectorDouble & | x0 = VectorDouble() , |
||
int | ivar = 0 , |
||
int | jvar = 0 |
||
) | const |
Derive the Specific volume for a given CoV
db | Set of data points |
cov | Target Coefficient of Variation |
mean | Value of the Mean |
ext | Target Block extension |
ndisc | Vector of discretization |
angles | Optional rotation angle for block |
x0 | Optional origin of the Block |
ivar | Rank of the first variable |
jvar | Rank of the second variable |
|
inlinevirtual |
|
inlinevirtual |
Reimplemented in CorAniso.
|
inlinevirtual |
|
inline |