Functions | |
MatrixRectangular | Model::evalCovMatrix (Db *db1, Db *db2=nullptr, int ivar0=-1, int jvar0=-1, const VectorInt &nbgh1=VectorInt(), const VectorInt &nbgh2=VectorInt(), const CovCalcMode *mode=nullptr) |
MatrixSquareSymmetric | Model::evalCovMatrixSymmetric (Db *db1, int ivar0=-1, const VectorInt &nbgh1=VectorInt(), const CovCalcMode *mode=nullptr) |
MatrixSparse * | Model::evalCovMatrixSparse (Db *db1, Db *db2=nullptr, int ivar0=-1, int jvar0=-1, const VectorInt &nbgh1=VectorInt(), const VectorInt &nbgh2=VectorInt(), const CovCalcMode *mode=nullptr, double eps=EPSILON3) |
VectorDouble | Model::evalCovMatrixV (Db *db1, Db *db2=nullptr, int ivar0=-1, int jvar0=-1, const VectorInt &nbgh1=VectorInt(), const VectorInt &nbgh2=VectorInt(), const CovCalcMode *mode=nullptr) |
MatrixRectangular | Model::evalCovMatrixOptim (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) |
MatrixSquareSymmetric | Model::evalCovMatrixSymmetricOptim (const Db *db1, int ivar0=-1, const VectorInt &nbgh1=VectorInt(), const CovCalcMode *mode=nullptr) |
double | Model::extensionVariance (const Db *db, const VectorDouble &ext, const VectorInt &ndisc, const VectorDouble &angles=VectorDouble(), const VectorDouble &x0=VectorDouble(), int ivar=0, int jvar=0) |
double | Model::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 | Model::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 | Model::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 | Model::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 |
void | Model::evalZAndGradients (const SpacePoint &p1, const SpacePoint &p2, double &covVal, VectorDouble &covGp, VectorDouble &covGG, const CovCalcMode *mode=nullptr, bool flagGrad=false) const |
void | Model::evalZAndGradients (const VectorDouble &vec, double &covVal, VectorDouble &covGp, VectorDouble &covGG, const CovCalcMode *mode=nullptr, bool flagGrad=false) const |
double | Model::evalCov (const VectorDouble &incr, int icov=0, const ECalcMember &member=ECalcMember::fromKey("LHS")) const |
void | Model::setSill (int icov, int ivar, int jvar, double value) |
void | Model::setRangeIsotropic (int icov, double range) |
void | Model::setMarkovCoeffs (int icov, const VectorDouble &coeffs) |
void | Model::setCovaFiltered (int icov, bool filtered) |
void | Model::setActiveFactor (int iclass) |
int | Model::getActiveFactor () const |
int | Model::getAnamNClass () const |
const DriftList * | Model::getDriftList () const |
TODO : to be removed (encapsulation of DriftList) More... | |
const ADrift * | Model::getDrift (int il) const |
int | Model::getDriftNumber () const |
int | Model::getExternalDriftNumber () const |
int | Model::getRankFext (int il) const |
int | Model::getDriftEquationNumber () const |
bool | Model::isDriftFiltered (unsigned int il) const |
int | Model::getDriftMaxIRFOrder (void) const |
bool | Model::isDriftDefined (const VectorInt &powers, int rank_fex=0) const |
bool | Model::isDriftDifferentDefined (const VectorInt &powers, int rank_fex=-1) const |
bool | Model::isDriftSampleDefined (const Db *db, int ib, int nech, const VectorInt &nbgh, const ELoc &loctype) const |
void | Model::setDriftFiltered (int il, bool filtered) |
VectorVectorDouble | Model::getDrifts (const Db *db, bool useSel=true) |
void | Model::setBetaHat (const VectorDouble &betaHat) |
double | Model::evalDrift (const Db *db, int iech, int il, const ECalcMember &member=ECalcMember::fromKey("LHS")) const |
double | Model::evalDriftValue (const Db *db, int iech, int ivar, int ib, const ECalcMember &member=ECalcMember::fromKey("LHS")) const |
VectorDouble | Model::evalDriftBySample (const Db *db, int iech, const ECalcMember &member=ECalcMember::fromKey("LHS")) const |
void | Model::evalDriftBySampleInPlace (const Db *db, int iech, const ECalcMember &member, VectorDouble &drftab) const |
MatrixRectangular | Model::evalDriftMatrix (const Db *db, int ivar0=-1, const VectorInt &nbgh=VectorInt(), const ECalcMember &member=ECalcMember::fromKey("LHS")) const |
double | Model::evalDriftVarCoef (const Db *db, int iech, int ivar, const VectorDouble &coeffs) const |
VectorDouble | Model::evalDriftVarCoefs (const Db *db, const VectorDouble &coeffs, int ivar=0, bool useSel=false) const |
const CovContext & | Model::getContext () const |
TODO : to be removed (encapsulation of Context) More... | |
const ASpace * | Model::getASpace () const |
const VectorDouble & | Model::getMeans () const |
double | Model::getMean (int ivar) const |
const VectorDouble & | Model::getCovar0s () const |
double | Model::getCovar0 (int ivar, int jvar) const |
double | Model::getField () const |
int | Model::getDimensionNumber () const |
void | Model::setMeans (const VectorDouble &mean) |
void | Model::setMean (double mean, int ivar=0) |
void | Model::setCovar0s (const VectorDouble &covar0) |
void | Model::setCovar0 (int ivar, int jvar, double covar0) |
void | Model::setField (double field) |
const EModelProperty & | Model::getCovMode () const |
Model * | Model::duplicate () const |
Model * | Model::createReduce (const VectorInt &validVars) const |
int | Model::getVariableNumber () const |
int | Model::hasExternalCov () const |
VectorDouble | Model::sampleUnitary (const VectorDouble &hh, int ivar=0, int jvar=0, VectorDouble codir=VectorDouble(), const CovCalcMode *mode=nullptr) |
VectorDouble | Model::envelop (const VectorDouble &hh, int ivar=0, int jvar=0, int isign=1, VectorDouble codir=VectorDouble(), const CovCalcMode *mode=nullptr) |
int | Model::fitFromCovIndices (Vario *vario, const VectorECov &types=ECov::fromKeys({"EXPONENTIAL"}), const Constraints &constraints=Constraints(), const Option_VarioFit &optvar=Option_VarioFit(), const Option_AutoFit &mauto=Option_AutoFit(), bool verbose=false) |
int | Model::fit (Vario *vario, const VectorECov &types=ECov::fromKeys({"SPHERICAL"}), const Constraints &constraints=Constraints(), const Option_VarioFit &optvar=Option_VarioFit(), const Option_AutoFit &mauto=Option_AutoFit(), bool verbose=false) |
int | Model::fitFromVMap (DbGrid *dbmap, const VectorECov &types=ECov::fromKeys({"SPHERICAL"}), const Constraints &constraints=Constraints(), const Option_VarioFit &optvar=Option_VarioFit(), const Option_AutoFit &mauto=Option_AutoFit(), bool verbose=false) |
int | Model::buildVmapOnDbGrid (DbGrid *dbgrid, const NamingConvention &namconv=NamingConvention("VMAP")) const |
int | Model::stabilize (double percent, bool verbose=false) |
int | Model::standardize (bool verbose=false) |
double | Model::gofToVario (const Vario *vario, bool verbose=true) |
static void | Model::gofDisplay (double gof, bool byValue=true, const VectorDouble &thresholds={2., 5., 10., 100}) |
static VectorECov | Model::initCovList (const VectorInt &covranks) |
bool | Model::isValid () const |
VectorDouble | Model::sample (const VectorDouble &h, const VectorDouble &codir=VectorDouble(), int ivar=0, int jvar=0, const CovCalcMode *mode=nullptr, const CovInternal *covint=nullptr) |
double | Model::evaluateOneIncr (double hh, const VectorDouble &codir=VectorDouble(), int ivar=0, int jvar=0, const CovCalcMode *mode=nullptr) |
void | Model::evaluateMatInPlace (const CovInternal *covint, const VectorDouble &d1, MatrixSquareGeneral &covtab, bool flag_init=false, double weight=1., const CovCalcMode *mode=nullptr) |
double | Model::evaluateOneGeneric (const CovInternal *covint, const VectorDouble &d1=VectorDouble(), double weight=1., const CovCalcMode *mode=nullptr) |
VectorDouble | Model::evaluateFromDb (Db *db, int ivar=0, int jvar=0, const CovCalcMode *mode=nullptr) |
double | Model::calculateStdev (Db *db1, int iech1, Db *db2, int iech2, bool verbose=false, double factor=1., const CovCalcMode *mode=nullptr) |
double | Model::computeLogLikelihood (Db *db, bool verbose=false) |
These functions are meant to calculate the covariance Matrix between two Dbs or between a Db and itself. They take into account the presence of a possible selection They also account for heterotopy (if Z-variables are defined in the Db(s)
db1 | First Db |
db2 | (Optional second Db) |
ivar0 | Rank of the selected variable in the first Db (-1 for all variables) |
jvar0 | Rank of the selected variable in the second Db (-1 for all variables) |
nbgh1 | Vector of indices of active samples in first Db (optional) |
nbgh2 | Vector of indices of active samples in second Db (optional) |
mode | CovCalcMode structure |
int Model::buildVmapOnDbGrid | ( | DbGrid * | dbgrid, |
const NamingConvention & | namconv = NamingConvention("VMAP") |
||
) | const |
double Model::calculateStdev | ( | Db * | db1, |
int | iech1, | ||
Db * | db2, | ||
int | iech2, | ||
bool | verbose = false , |
||
double | factor = 1. , |
||
const CovCalcMode * | mode = nullptr |
||
) |
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 |
|
inline |
double Model::computeLogLikelihood | ( | Db * | db, |
bool | verbose = false |
||
) |
Compute the log-likelihood (based on covariance)
db | Db structure where variable are loaded from |
verbose | Verbose flag |
Model * Model::duplicate | ( | ) | const |
VectorDouble Model::envelop | ( | const VectorDouble & | hh, |
int | ivar = 0 , |
||
int | jvar = 0 , |
||
int | isign = 1 , |
||
VectorDouble | codir = VectorDouble() , |
||
const CovCalcMode * | mode = nullptr |
||
) |
double Model::evalCov | ( | const VectorDouble & | incr, |
int | icov = 0 , |
||
const ECalcMember & | member = ECalcMember::fromKey("LHS") |
||
) | const |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
double Model::evalDrift | ( | const Db * | db, |
int | iech, | ||
int | il, | ||
const ECalcMember & | member = ECalcMember::fromKey("LHS") |
||
) | const |
Evaluate a given drift function for a given sample
db | Db structure |
iech | Rank of the target sample |
il | Rank of the drift function |
member | Member type (used to check filtering) |
VectorDouble Model::evalDriftBySample | ( | const Db * | db, |
int | iech, | ||
const ECalcMember & | member = ECalcMember::fromKey("LHS") |
||
) | const |
void Model::evalDriftBySampleInPlace | ( | const Db * | db, |
int | iech, | ||
const ECalcMember & | member, | ||
VectorDouble & | drftab | ||
) | const |
|
inline |
double Model::evalDriftValue | ( | const Db * | db, |
int | iech, | ||
int | ivar, | ||
int | ib, | ||
const ECalcMember & | member = ECalcMember::fromKey("LHS") |
||
) | const |
double Model::evalDriftVarCoef | ( | const Db * | db, |
int | iech, | ||
int | ivar, | ||
const VectorDouble & | coeffs | ||
) | const |
Evaluate the drift with a given sample and a given variable The value is scaled by 'coeffs'
[in] | db | Db structure |
[in] | iech | Rank of the sample |
[in] | ivar | Rank of the variable |
[in] | coeffs | Vector of coefficients |
VectorDouble Model::evalDriftVarCoefs | ( | const Db * | db, |
const VectorDouble & | coeffs, | ||
int | ivar = 0 , |
||
bool | useSel = false |
||
) | const |
A vector of the drift evaluation (for all samples)
db | Db structure |
coeffs | Vector of drift coefficients |
ivar | Variable rank (used for constant drift value) |
useSel | When TRUE, only non masked samples are returned |
VectorDouble Model::evaluateFromDb | ( | Db * | db, |
int | ivar = 0 , |
||
int | jvar = 0 , |
||
const CovCalcMode * | mode = nullptr |
||
) |
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 Model::evaluateMatInPlace | ( | const CovInternal * | covint, |
const VectorDouble & | d1, | ||
MatrixSquareGeneral & | covtab, | ||
bool | flag_init = false , |
||
double | weight = 1. , |
||
const CovCalcMode * | mode = nullptr |
||
) |
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 Model::evaluateOneGeneric | ( | const CovInternal * | covint, |
const VectorDouble & | d1 = VectorDouble() , |
||
double | weight = 1. , |
||
const CovCalcMode * | mode = nullptr |
||
) |
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 Model::evaluateOneIncr | ( | double | hh, |
const VectorDouble & | codir = VectorDouble() , |
||
int | ivar = 0 , |
||
int | jvar = 0 , |
||
const CovCalcMode * | mode = nullptr |
||
) |
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 |
void Model::evalZAndGradients | ( | const SpacePoint & | p1, |
const SpacePoint & | p2, | ||
double & | covVal, | ||
VectorDouble & | covGp, | ||
VectorDouble & | covGG, | ||
const CovCalcMode * | mode = nullptr , |
||
bool | flagGrad = false |
||
) | const |
void Model::evalZAndGradients | ( | const VectorDouble & | vec, |
double & | covVal, | ||
VectorDouble & | covGp, | ||
VectorDouble & | covGG, | ||
const CovCalcMode * | mode = nullptr , |
||
bool | flagGrad = false |
||
) | const |
|
inline |
int Model::fit | ( | Vario * | vario, |
const VectorECov & | types = ECov::fromKeys({"SPHERICAL"}) , |
||
const Constraints & | constraints = Constraints() , |
||
const Option_VarioFit & | optvar = Option_VarioFit() , |
||
const Option_AutoFit & | mauto = Option_AutoFit() , |
||
bool | verbose = false |
||
) |
Automatic Fitting procedure from an experimental Variogram
vario | Experimental variogram to be fitted |
types | Vector of ECov (see remarks) |
constraints | Set of Constraints |
optvar | Set of options |
mauto | Special parameters for Automatic fitting procedure (instance of Option_AutoFit), for exemple wmode (type of weighting function) |
verbose | Verbose option |
TODO : What to do with that ?
int Model::fitFromCovIndices | ( | Vario * | vario, |
const VectorECov & | types = ECov::fromKeys({"EXPONENTIAL"}) , |
||
const Constraints & | constraints = Constraints() , |
||
const Option_VarioFit & | optvar = Option_VarioFit() , |
||
const Option_AutoFit & | mauto = Option_AutoFit() , |
||
bool | verbose = false |
||
) |
Automatic Fitting procedure
vario | Experimental variogram to be fitted |
types | Vector of ECov integer values |
constraints | Set of Constraints |
optvar | Set of options |
mauto | Special parameters for Automatic fitting procedure |
verbose | Verbose option |
TODO : What to do with that ?
int Model::fitFromVMap | ( | DbGrid * | dbmap, |
const VectorECov & | types = ECov::fromKeys({"SPHERICAL"}) , |
||
const Constraints & | constraints = Constraints() , |
||
const Option_VarioFit & | optvar = Option_VarioFit() , |
||
const Option_AutoFit & | mauto = Option_AutoFit() , |
||
bool | verbose = false |
||
) |
Automatic Fitting procedure from A Variogram Map stored on a DbGrid
dbmap | DbGrid containing the Variogram Map |
types | Vector of ECov |
constraints | Set of Constraints |
optvar | Set of options |
mauto | Special parameters for Automatic fitting procedure (instance of Option_AutoFit), for exemple wmode (type of weighting function) |
verbose | Verbose option |
int Model::getActiveFactor | ( | ) | const |
int Model::getAnamNClass | ( | ) | const |
|
inline |
|
inline |
TODO : to be removed (encapsulation of Context)
|
inline |
|
inline |
const EModelProperty & Model::getCovMode | ( | ) | const |
|
inline |
const ADrift * Model::getDrift | ( | int | il | ) | const |
int Model::getDriftEquationNumber | ( | ) | const |
int Model::getDriftMaxIRFOrder | ( | void | ) | const |
int Model::getDriftNumber | ( | ) | const |
VectorVectorDouble Model::getDrifts | ( | const Db * | db, |
bool | useSel = true |
||
) |
int Model::getExternalDriftNumber | ( | ) | const |
|
inline |
|
inline |
|
inline |
int Model::getRankFext | ( | int | il | ) | const |
|
inline |
|
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 Model::gofToVario | ( | const Vario * | vario, |
bool | verbose = true |
||
) |
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 |
int Model::hasExternalCov | ( | ) | const |
|
static |
bool Model::isDriftDefined | ( | const VectorInt & | powers, |
int | rank_fex = 0 |
||
) | const |
bool Model::isDriftDifferentDefined | ( | const VectorInt & | powers, |
int | rank_fex = -1 |
||
) | const |
bool Model::isDriftFiltered | ( | unsigned int | il | ) | const |
bool Model::isDriftSampleDefined | ( | const Db * | db, |
int | ib, | ||
int | nech, | ||
const VectorInt & | nbgh, | ||
const ELoc & | loctype | ||
) | const |
bool Model::isValid | ( | ) | const |
VectorDouble Model::sample | ( | const VectorDouble & | h, |
const VectorDouble & | codir = VectorDouble() , |
||
int | ivar = 0 , |
||
int | jvar = 0 , |
||
const CovCalcMode * | mode = nullptr , |
||
const CovInternal * | covint = nullptr |
||
) |
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 Model::sampleUnitary | ( | const VectorDouble & | hh, |
int | ivar = 0 , |
||
int | jvar = 0 , |
||
VectorDouble | codir = VectorDouble() , |
||
const CovCalcMode * | mode = nullptr |
||
) |
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 |
|
inline |
void Model::setActiveFactor | ( | int | iclass | ) |
void Model::setBetaHat | ( | const VectorDouble & | betaHat | ) |
void Model::setCovaFiltered | ( | int | icov, |
bool | filtered | ||
) |
void Model::setCovar0 | ( | int | ivar, |
int | jvar, | ||
double | covar0 | ||
) |
void Model::setCovar0s | ( | const VectorDouble & | covar0 | ) |
void Model::setDriftFiltered | ( | int | il, |
bool | filtered | ||
) |
void Model::setField | ( | double | field | ) |
void Model::setMarkovCoeffs | ( | int | icov, |
const VectorDouble & | coeffs | ||
) |
void Model::setMean | ( | double | mean, |
int | ivar = 0 |
||
) |
void Model::setMeans | ( | const VectorDouble & | mean | ) |
void Model::setRangeIsotropic | ( | int | icov, |
double | range | ||
) |
void Model::setSill | ( | int | icov, |
int | ivar, | ||
int | jvar, | ||
double | value | ||
) |
|
inline |
|
inline |
int Model::stabilize | ( | double | percent, |
bool | verbose = false |
||
) |
Stabilize the model (in the monovariate case)
[in] | percent | Percentage of nugget effect added |
[in] | verbose | true for a verbose output |
int Model::standardize | ( | bool | verbose = false | ) |
Normalize the model
[in] | verbose | true for a verbose output |