|
gstlearn
0.2.1
Geostatistics & Machine Learning toolbox
|
#include <ACov.hpp>
Public Member Functions | |
| ACov (const ASpace *space=nullptr) | |
| ACov (const ACov &r) | |
| ACov & | operator= (const ACov &r) |
| virtual | ~ACov () |
| virtual int | getNVariables () const =0 |
| ACov Interface. More... | |
| virtual double | eval0 (int ivar=0, int jvar=0, const CovCalcMode &mode=CovCalcMode()) const =0 |
| virtual double | eval (const SpacePoint &p1, const SpacePoint &p2, int ivar=0, int jvar=0, const CovCalcMode &mode=CovCalcMode()) const =0 |
| virtual double | evalCovOnSphere (double, int, bool) const |
| virtual double | evalSpectrum (const VectorDouble &, int, int) const |
| MatrixSquareGeneral | eval0Nvar (const CovCalcMode &mode=CovCalcMode()) const |
| VectorDouble | eval (const std::vector< SpacePoint > &vec_p1, const std::vector< SpacePoint > &vec_p2, int ivar=0, int jvar=0, const CovCalcMode &mode=CovCalcMode()) const |
| MatrixSquareGeneral | evalMat (const SpacePoint &p1, const SpacePoint &p2, const CovCalcMode &mode=CovCalcMode()) const |
| double | evalIvarIpas (double step, const VectorDouble &dir, int ivar=0, int jvar=0, const VectorDouble ¢er=VectorDouble(), const CovCalcMode &mode=CovCalcMode()) const |
| double | evalIvarIpasIncr (const VectorDouble &dincr, int ivar=0, int jvar=0, const CovCalcMode &mode=CovCalcMode()) const |
| VectorDouble | evalIvarNpas (const VectorDouble &vec_step, const VectorDouble &dir=VectorDouble(), int ivar=0, int jvar=0, const VectorDouble ¢er=VectorDouble(), const CovCalcMode &mode=CovCalcMode()) const |
| MatrixSquareGeneral | evalNvarIpas (double step, const VectorDouble &dir, const VectorDouble ¢er=VectorDouble(), const CovCalcMode &mode=CovCalcMode()) const |
| MatrixSquareGeneral | evalNvarIpasIncr (const VectorDouble &dincr, const CovCalcMode &mode) const |
| double | evalIsoIvarIpas (double step, int ivar=0, int jvar=0, const CovCalcMode &mode=CovCalcMode()) const |
| VectorDouble | evalIsoIvarNpas (const VectorDouble &vec_step, int ivar=0, int jvar=0, const CovCalcMode &mode=CovCalcMode()) const |
| MatrixSquareGeneral | evalIsoNvarIpas (double step, const CovCalcMode &mode=CovCalcMode()) const |
| double | evalCvv (const VectorDouble &ext, const VectorInt &ndisc, const VectorDouble &angles=VectorDouble(), int ivar=0, int jvar=0, const CovCalcMode &mode=CovCalcMode()) 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=CovCalcMode()) const |
| MatrixSquareGeneral | evalCvvM (const VectorDouble &ext, const VectorInt &ndisc, const VectorDouble &angles=VectorDouble(), const CovCalcMode &mode=CovCalcMode()) 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=CovCalcMode()) 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=CovCalcMode()) const |
| MatrixSquareGeneral | evalCxvM (const SpacePoint &p1, const VectorDouble &ext, const VectorInt &ndisc, const VectorDouble &angles=VectorDouble(), const VectorDouble &x0=VectorDouble(), const CovCalcMode &mode=CovCalcMode()) const |
| VectorDouble | evalPointToDb (const SpacePoint &p1, const Db *db2, int ivar=0, int jvar=0, bool useSel=true, const CovCalcMode &mode=CovCalcMode()) const |
| double | evalAverageDbToDb (const Db *db1, const Db *db2, int ivar=0, int jvar=0, const CovCalcMode &mode=CovCalcMode()) const |
| double | evalAveragePointToDb (const SpacePoint &p1, const Db *db2, int ivar=0, int jvar=0, const CovCalcMode &mode=CovCalcMode()) const |
| MatrixRectangular | evalCovMatrix (const Db *db1, const Db *db2=nullptr, int ivar=0, int jvar=0, const CovCalcMode &mode=CovCalcMode()) 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 |
Public Member Functions inherited from ASpaceObject | |
| ASpaceObject (const ASpace *space=nullptr) | |
| ASpaceObject (const ASpace &space) | |
| ASpaceObject (const ASpaceObject &r) | |
| ASpaceObject & | operator= (const ASpaceObject &r) |
| virtual | ~ASpaceObject () |
| virtual String | toString (const AStringFormat *strfmt=nullptr) const override |
| AStringable interface. More... | |
| const ASpace * | getSpace () const |
| Accessor to the current object space context. More... | |
| bool | isConsistent () const |
| Indicate if I am consistent with my current space context. More... | |
| VectorDouble | getUnitaryVector () const |
| Return unitary vector for the current space context. More... | |
| virtual bool | isConsistent (const ASpace *space) const =0 |
| Indicate if I am consistent with the provided space. More... | |
| unsigned int | getNDim () const |
| Shortcuts to ASpace methods. More... | |
| const VectorDouble & | getOrigin () const |
| Return the current space context origin coordinates. More... | |
| double | getDistance (const SpacePoint &p1, const SpacePoint &p2) const |
| Return the distance between two space points for the current space context. More... | |
| VectorDouble | getIncrement (const SpacePoint &p1, const SpacePoint &p2) const |
| Return the increment vector between two space points for the current space context. More... | |
Public Member Functions inherited from AStringable | |
| 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 |
Private Member Functions | |
| DbGrid * | _discretizeBlock (const VectorDouble &ext, const VectorInt &ndisc, const VectorDouble &angles=VectorDouble(), const VectorDouble &x0=VectorDouble()) const |
| Db * | _discretizeBlockRandom (const DbGrid *dbgrid, int seed=34131) const |
| double | _getVolume (const VectorDouble &ext) const |
Additional Inherited Members | |
Protected Member Functions inherited from ASpaceObject | |
| void | setNDim (int ndim) |
| Modify the Space dimension of an already created item (To be used only during creation ... in particular when reading NF) More... | |
Protected Attributes inherited from ASpaceObject | |
| const ASpace * | _space |
| Current space context of the object. More... | |
| ACov::ACov | ( | const ASpace * | space = nullptr | ) |
| ACov::ACov | ( | const ACov & | r | ) |
|
virtual |
|
private |
Creates the discretization grid
| ext | Vecto of Block extensions |
| ndisc | Vector of Discretizations |
| angles | Vector of rotation angles |
| x0 | Vector of Discretization origin |
|
private |
| 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 |
|
pure virtual |
Implemented in CovAniso, CovLMCConvolution, CovLMCTapering, CovLMCAnamorphosis, ACovAnisoList, and CovGradientNumerical.
| VectorDouble ACov::eval | ( | const std::vector< SpacePoint > & | vec_p1, |
| const std::vector< SpacePoint > & | vec_p2, | ||
| int | ivar = 0, |
||
| int | jvar = 0, |
||
| const CovCalcMode & | mode = CovCalcMode() |
||
| ) | const |
|
pure virtual |
Implemented in CovAniso, CovLMCConvolution, CovLMCTapering, CovLMCAnamorphosis, ACovAnisoList, and CovGradientNumerical.
| MatrixSquareGeneral ACov::eval0Nvar | ( | const CovCalcMode & | mode = CovCalcMode() | ) | const |
| double ACov::evalAverageDbToDb | ( | const Db * | db1, |
| const Db * | db2, | ||
| int | ivar = 0, |
||
| int | jvar = 0, |
||
| const CovCalcMode & | mode = CovCalcMode() |
||
| ) | 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 |
| mode | CovCalcMode structure |
| double ACov::evalAveragePointToDb | ( | const SpacePoint & | p1, |
| const Db * | db2, | ||
| int | ivar = 0, |
||
| int | jvar = 0, |
||
| const CovCalcMode & | mode = CovCalcMode() |
||
| ) | 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 |
| MatrixRectangular ACov::evalCovMatrix | ( | const Db * | db1, |
| const Db * | db2 = nullptr, |
||
| int | ivar = 0, |
||
| int | jvar = 0, |
||
| const CovCalcMode & | mode = CovCalcMode() |
||
| ) | const |
Establish the covariance matrix between two Dbs
| [in] | db1 | First Db |
| [in] | db2 | Second Db (=db1 if absent) |
| [in] | ivar | Rank of the first variable (-1: all variables) |
| [in] | jvar | Rank of the second variable (-1: all variables) |
| [in] | mode | CovCalcMode structure |
|
inlinevirtual |
Reimplemented in CovAniso.
| double ACov::evalCvv | ( | const VectorDouble & | ext, |
| const VectorInt & | ndisc, | ||
| const VectorDouble & | angles = VectorDouble(), |
||
| int | ivar = 0, |
||
| int | jvar = 0, |
||
| const CovCalcMode & | mode = CovCalcMode() |
||
| ) | 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 |
| MatrixSquareGeneral ACov::evalCvvM | ( | const VectorDouble & | ext, |
| const VectorInt & | ndisc, | ||
| const VectorDouble & | angles = VectorDouble(), |
||
| const CovCalcMode & | mode = CovCalcMode() |
||
| ) | 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 = CovCalcMode() |
||
| ) | 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 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 = CovCalcMode() |
||
| ) | 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 |
| 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 = CovCalcMode() |
||
| ) | const |
| MatrixSquareGeneral ACov::evalCxvM | ( | const SpacePoint & | p1, |
| const VectorDouble & | ext, | ||
| const VectorInt & | ndisc, | ||
| const VectorDouble & | angles = VectorDouble(), |
||
| const VectorDouble & | x0 = VectorDouble(), |
||
| const CovCalcMode & | mode = CovCalcMode() |
||
| ) | const |
| double ACov::evalIsoIvarIpas | ( | double | step, |
| int | ivar = 0, |
||
| int | jvar = 0, |
||
| const CovCalcMode & | mode = CovCalcMode() |
||
| ) | 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::evalIsoIvarNpas | ( | const VectorDouble & | vec_step, |
| int | ivar = 0, |
||
| int | jvar = 0, |
||
| const CovCalcMode & | mode = CovCalcMode() |
||
| ) | 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 |
TODO : Not true whatever the space
| MatrixSquareGeneral ACov::evalIsoNvarIpas | ( | double | step, |
| const CovCalcMode & | mode = CovCalcMode() |
||
| ) | 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 |
TODO : Not true whatever the space
| double ACov::evalIvarIpas | ( | double | step, |
| const VectorDouble & | dir, | ||
| int | ivar = 0, |
||
| int | jvar = 0, |
||
| const VectorDouble & | center = VectorDouble(), |
||
| const CovCalcMode & | mode = CovCalcMode() |
||
| ) | 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 |
| center | Coordinates of the center |
| mode | CovCalcMode structure |
| double ACov::evalIvarIpasIncr | ( | const VectorDouble & | dincr, |
| int | ivar = 0, |
||
| int | jvar = 0, |
||
| const CovCalcMode & | mode = CovCalcMode() |
||
| ) | const |
| VectorDouble ACov::evalIvarNpas | ( | const VectorDouble & | vec_step, |
| const VectorDouble & | dir = VectorDouble(), |
||
| int | ivar = 0, |
||
| int | jvar = 0, |
||
| const VectorDouble & | center = VectorDouble(), |
||
| const CovCalcMode & | mode = CovCalcMode() |
||
| ) | 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 |
| center | Coordinates of the Center |
| mode | CovCalcMode structure |
| MatrixSquareGeneral ACov::evalMat | ( | const SpacePoint & | p1, |
| const SpacePoint & | p2, | ||
| const CovCalcMode & | mode = CovCalcMode() |
||
| ) | const |
| MatrixSquareGeneral ACov::evalNvarIpas | ( | double | step, |
| const VectorDouble & | dir, | ||
| const VectorDouble & | center = VectorDouble(), |
||
| const CovCalcMode & | mode = CovCalcMode() |
||
| ) | 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 |
| center | Coordinates of the center |
| mode | CovCalcMode structure |
| MatrixSquareGeneral ACov::evalNvarIpasIncr | ( | const VectorDouble & | dincr, |
| const CovCalcMode & | mode | ||
| ) | const |
| VectorDouble ACov::evalPointToDb | ( | const SpacePoint & | p1, |
| const Db * | db2, | ||
| int | ivar = 0, |
||
| int | jvar = 0, |
||
| bool | useSel = true, |
||
| const CovCalcMode & | mode = CovCalcMode() |
||
| ) | const |
Calculate the Covariance vector between a Point and all the samples of 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 |
| useSel | When TRUE, the returned vector is reduced to active samples Otherwise, returns TEST for masked samples |
| mode | CovCalcMode structure |
|
inlinevirtual |
Reimplemented in CovAniso.
| 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 |
|
pure virtual |
ACov Interface.
Implemented in CovAniso, and ACovAnisoList.
| 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 |
| 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 |