1.3.1
CCC
 
Vario Class Reference

Class containing the Spatial Characteristics as calculated experimentally from the data (contained in a Db). More...

#include <Vario.hpp>

Inheritance diagram for Vario:
AVario ASerializable AStringable ICloneable

Detailed Description

Class containing the Spatial Characteristics as calculated experimentally from the data (contained in a Db).

The experimental Spatial Characteristics is usually referred to as the experimental variogram. However, note that it can rather calculate other results such as a Covariance or a Madogram. All these quantities can be regrouped by considering them as two-points statistics. For a complete list of calculation methods, please refer to ECalcVario.hpp.

This class is composed of two parts:

  • the first part describes the rule when comparing two samples from the Db. They are defined by:
    • the definition of the Geometry: e.g. definition of calculation direction, tolerances. For more information, please refer to VarioParam.hpp
    • the definition of the calculations Options: e.g. calculation method.
    • some additional Conditions used during calculations: e.g. usage of Faults. For more information, please refer to ABiTargetCheck.hpp.
  • the second part are the results of the calculations

Results

All the Spatial Characteristics are calculated:

  • from the sample values of active samples contained in a Db,
  • for all the variables (defined with the locator ELoc.Z): in the multivariate case, simple and cross-variograms are calculated
  • for a series of distance lags.

They are always expressed as a table with one row per distance lag and three columns containing:

  • the number of pairs
  • the average value of the distance
  • the average value of the two-points statistics

Note that:

  • the lags for which no pair is found are skipped.
  • some methods correspond to an even function (values are equal whether the distance between the two end-points is counted positively or negatively: then only one-sided results are stored. For odd, the results of both sides are stored.
  • for a number of lags equal to N, the number of rows is {N+1} when the function is even and {2N+1} when the function is odd.
  • in the multivariate case (NV variables), the number of rows is multiplied by NV*(NV+1)/2. In order to avoid any indexing problem, the user should use the assessors provided in order to access to the information relative to the target pair of variables.

Public Member Functions

 Vario (const VarioParam &varioparam)
 
 Vario (const Vario &r)
 
Variooperator= (const Vario &r)
 
virtual ~Vario ()
 
virtual String toString (const AStringFormat *strfmt=nullptr) const override
 AStringable Interface. More...
 
double _getIVAR (const Db *db, int iech, int ivar) const override
 AVario Interface. More...
 
void _setResult (int iech1, int iech2, int nvar, int ipas, int ivar, int jvar, int orient, double ww, double dist, double value) override
 
void resetReduce (const VectorInt &varcols, const VectorInt &dircols, bool asSymmetric=false)
 
bool getFlagAsym () const
 
bool drawOnlyPositiveX (int ivar, int jvar) const
 
bool drawOnlyPositiveY (int ivar, int jvar) const
 
int getVariableNumber () const
 
const VectorDoublegetMeans () const
 
double getMean (int ivar) const
 
double getVar (int ivar, int jvar) const
 
double getVarIndex (int ijvar) const
 
const VectorDoublegetVars () const
 
void setMeans (const VectorDouble &means)
 
void setMean (double mean, int ivar=0)
 
void setVar (double value, int ivar=0, int jvar=0)
 
void setVars (const VectorDouble &vars)
 
void setVarIndex (int ijvar, double value)
 
void setDb (Db *db)
 
int getDirSize (int idir) const
 
double getGgByIndex (int idir=0, int i=0) const
 
double getHhByIndex (int idir=0, int i=0) const
 
double getSwByIndex (int idir=0, int i=0) const
 
double getUtilizeByIndex (int idir=0, int i=0) const
 
double getGg (int idir=0, int ivar=0, int jvar=0, int ipas=0, bool asCov=false, bool flagNormalized=false) const
 
double getHh (int idir=0, int ivar=0, int jvar=0, int ipas=0) const
 
double getSw (int idir=0, int ivar=0, int jvar=0, int ipas=0) const
 
double getUtilize (int idir=0, int ivar=0, int jvar=0, int ipas=0) const
 
VectorVectorDouble getVec (int idir=0, int ivar=0, int jvar=0) const
 
VectorDouble getGgVec (int idir=0, int ivar=0, int jvar=0, bool asCov=false, bool flagNormalized=false, bool compress=true) const
 
VectorDouble getHhVec (int idir=0, int ivar=0, int jvar=0, bool compress=true) const
 
VectorDouble getSwVec (int idir=0, int ivar=0, int jvar=0, bool compress=true) const
 
VectorDouble getUtilizeVec (int idir=0, int ivar=0, int jvar=0, bool compress=true) const
 
void setSwVec (int idir, int ivar, int jvar, const VectorDouble &sw)
 
void setHhVec (int idir, int ivar, int jvar, const VectorDouble &hh)
 
void setGgVec (int idir, int ivar, int jvar, const VectorDouble &gg)
 
VectorDouble getGgs (int idir=0, int ivar=0, int jvar=0, const VectorInt &ipas=VectorInt()) const
 
VectorDouble setGgs (int idir, int ivar, int jvar, const VectorInt &ipas, const VectorDouble &values)
 
const VectorDoublegetAllGg (int idir=0) const
 
const VectorDoublegetAllHh (int idir=0) const
 
const VectorDoublegetAllSw (int idir=0) const
 
const VectorDoublegetAllUtilize (int idir=0) const
 
void setGgByIndex (int idir, int i, double gg)
 
void setHhByIndex (int idir, int i, double hh)
 
void setSwByIndex (int idir, int i, double sw)
 
void setUtilizeByIndex (int idir, int i, double utilize)
 
void setSw (int idir, int ivar, int jvar, int ipas, double sw)
 
void setHh (int idir, int ivar, int jvar, int ipas, double hh)
 
void setGg (int idir, int ivar, int jvar, int ipas, double gg)
 
void setUtilize (int idir, int ivar, int jvar, int ipas, double utilize)
 
void updateSwByIndex (int idir, int i, double sw)
 
void updateHhByIndex (int idir, int i, double hh)
 
void updateGgByIndex (int idir, int i, double gg)
 
int getCenter (int ivar=0, int jvar=0, int idir=0) const
 
int getNext (int ivar=0, int jvar=0, int idir=0, int shift=1) const
 
int internalVariableResize ()
 
void internalDirectionResize (int ndir=0, bool flagDirs=true)
 
double getHmax (int ivar=-1, int jvar=-1, int idir=-1) const
 
VectorDouble getHRange (int ivar=-1, int jvar=-1, int idir=-1) const
 
double getGmax (int ivar=-1, int jvar=-1, int idir=-1, bool flagAbs=false, bool flagSill=false) const
 
VectorDouble getGRange (int ivar=-1, int jvar=-1, int idir=-1, bool flagSill=false) const
 
void patchCenter (int idir, int nech, double rho)
 
int fill (int idir, const VectorDouble &sw, const VectorDouble &gg, const VectorDouble &hh)
 
int getDirAddress (int idir, int ivar, int jvar, int ipas, bool flag_abs=false, int sens=0) const
 
int getVarAddress (int ivar, int jvar) const
 
int getLagTotalNumber (int idir) const
 
int compute (Db *db, const ECalcVario &calcul=ECalcVario::fromKey("VARIOGRAM"), bool flag_sample=false, bool verr_mode=false, const Model *model=nullptr, int niter_UK=0, bool verbose=false)
 
int computeIndic (Db *db, const ECalcVario &calcul=ECalcVario::fromKey("VARIOGRAM"), bool flag_sample=false, bool verr_mode=false, const Model *model=nullptr, int niter_UK=0, bool verbose=false, int nfacmax=-1)
 
int computeGeometry (Db *db, Vario_Order *vorder, int *npair)
 
int computeVarioVect (Db *db, int ncomp)
 
int computeGeometryMLayers (Db *db, VectorInt &seltab, Vario_Order *vorder)
 
int regularizeFromModel (const Model &model, const VectorDouble &ext, const VectorInt &ndisc, const VectorDouble &angles=VectorDouble(), const CovCalcMode *mode=nullptr, bool asCov=false)
 
int regularizeFromDbGrid (Model *model, const Db &db, const CovCalcMode *mode=nullptr)
 
void getExtension (int ivar, int jvar, int idir0, int flag_norm, int flag_vars, double distmin, double distmax, double varmin, double varmax, int *flag_hneg, int *flag_gneg, double *c0, double *hmin, double *hmax, double *gmin, double *gmax)
 
int sampleModel (Model *model, const CovCalcMode *mode=nullptr)
 
const DirParamgetDirParam (int idir) const
 
int getDirectionNumber () const
 
const VectorDoublegetDates () const
 
bool hasDate () const
 
double getDates (int idate, int icas) const
 
int getDateNumber () const
 
double getScale () const
 
int getDimensionNumber () const
 
const ASpacegetSpace () const
 
void setScale (double scale)
 
void addDirs (const DirParam &dirparam)
 
int getLagNumber (int idir) const
 
double getDPas (int idir) const
 
int getDimensionNumber (int idir) const
 
VectorDouble getCodirs (int idir) const
 
double getCodir (int idir, int idim) const
 
double getMaximumDistance (int idir) const
 
int getIdate (int idir) const
 
VectorInt getGrincrs (int idir)
 
double getGrincr (int idir, int idim)
 
bool isDefinedForGrid () const
 
void setNVar (int nvar)
 
void setCalculName (const String calcul_name)
 
int prepare (const ECalcVario &calcul=ECalcVario::fromKey("VARIOGRAM"), bool defineList=true)
 
const VarioParamgetVarioParam () const
 
int getBiPtsNumberPerDirection () const
 
const ABiTargetCheckgetBipts (int idir, int rank) const
 
bool keepPair (int idir, SpaceTarget &T1, SpaceTarget &T2, double *dist)
 
int getRankFromDirAndDate (int idir, int idate)
 
int transformCut (int nh, double ycut)
 
int transformZToY (const AAnam *anam)
 
int transformYToZ (const AAnam *anam)
 
- Public Member Functions inherited from AVario
 AVario ()
 
 AVario (const AVario &r)
 
AVariooperator= (const AVario &r)
 
virtual ~AVario ()
 
void evaluate (Db *db, int nvar, int iech1, int iech2, int ipas, double dist, int do_asym=0)
 
const ECalcVario & getCalcul () const
 
void setCalcul (const ECalcVario &calcul)
 
- Public Member Functions inherited from AStringable
 AStringable ()
 
 AStringable (const AStringable &r)
 
AStringableoperator= (const AStringable &r)
 
virtual ~AStringable ()
 
virtual void display (const AStringFormat *strfmt=nullptr) const final
 
virtual void display (int level) const final
 
- Public Member Functions inherited from ICloneable
 ICloneable ()
 
virtual ~ICloneable ()
 
virtual ICloneableclone () const =0
 
- Public Member Functions inherited from ASerializable
 ASerializable ()
 
 ASerializable (const ASerializable &r)
 
ASerializableoperator= (const ASerializable &r)
 
virtual ~ASerializable ()
 
bool deserialize (std::istream &is, bool verbose=true)
 
bool serialize (std::ostream &os, bool verbose=true) const
 
bool dumpToNF (const String &neutralFilename, bool verbose=false) const
 

Static Public Member Functions

static Variocreate (const VarioParam &varioparam)
 
static VariocreateFromNF (const String &neutralFilename, bool verbose=true)
 
static VariocreateRegularizeFromModel (const Model &model, const VarioParam &varioparam, const VectorDouble &ext, const VectorInt &ndisc, const VectorDouble &angles, bool asCov=false)
 
static VariocreateTransformZToY (const Vario &varioZ, const AAnam *anam)
 
static VariocreateTransformYToZ (const Vario &varioY, const AAnam *anam)
 
static VariocreateReduce (const Vario &varioIn, const VectorInt &varcols, const VectorInt &dircols, bool asSymmetric=false)
 
static VariocomputeFromDb (const VarioParam &varioparam, Db *db, const ECalcVario &calcul=ECalcVario::fromKey("VARIOGRAM"), bool flag_sample=false, bool verr_mode=false, Model *model=nullptr, int niter_UK=0, bool verbose=false)
 
- Static Public Member Functions inherited from AVario
static const ECalcVario getCalculType (const String &calcul_name)
 
- Static Public Member Functions inherited from ASerializable
static String buildFileName (int status, const String &filename, bool ensureDirExist=false)
 
static String getHomeDirectory (const String &sub="")
 
static String getWorkingDirectory ()
 
static String getTestData (const String &subdir, const String &filename)
 
static String getFileIdentity (const String &filename, bool verbose=false)
 
static void setContainerName (bool useDefault, const String &containerName="", bool verbose=false)
 
static void unsetContainerName ()
 
static void setPrefixName (const String &prefixName)
 
static void unsetPrefixName ()
 
static const StringgetContainerName ()
 
static const StringgetPrefixName ()
 
static bool createDirectory (const String &dir)
 
static String getExecDirectory ()
 
static String getDirectory (const String &path)
 

Public Attributes

 DECLARE_TOTL
 ICloneable interface. More...
 

Constructor & Destructor Documentation

◆ Vario() [1/2]

Vario::Vario ( const VarioParam varioparam)

Build a Vario object by calculating the experimental variogram

Parameters
varioparamVarioParam structure

◆ Vario() [2/2]

Vario::Vario ( const Vario r)

◆ ~Vario()

Vario::~Vario ( )
virtual

Member Function Documentation

◆ _getIVAR()

double Vario::_getIVAR ( const Db db,
int  iech,
int  ivar 
) const
overridevirtual

AVario Interface.

Calculate the data value (possibly after removing the global trend)

Returns
The data value (or the residual)
Parameters
[in]dbDb descriptor
[in]iechRank of the sample
[in]ivarRank of the variable
Remarks
The trend removal only applies on the first variable
Therefore, if applied on any variable rank other than 0,
TEST is returned

Implements AVario.

◆ _setResult()

void Vario::_setResult ( int  iech1,
int  iech2,
int  nvar,
int  ipas,
int  ivar,
int  jvar,
int  orient,
double  ww,
double  dist,
double  value 
)
overridevirtual

Internal function for setting a variogram value

Parameters
[in]iech1Rank of the first sample
[in]iech2Rank of the second sample
[in]nvarNumber of variables
[in]ipasRank of the variogram lag
[in]ivarIndex of the first variable
[in]jvarIndex of the second variable
[in]orientOrientation
[in]wwWeight
[in]distDistance
[in]valueVariogram value

Implements AVario.

◆ addDirs()

void Vario::addDirs ( const DirParam dirparam)
inline

◆ compute()

int Vario::compute ( Db db,
const ECalcVario &  calcul = ECalcVario::fromKey("VARIOGRAM"),
bool  flag_sample = false,
bool  verr_mode = false,
const Model model = nullptr,
int  niter_UK = 0,
bool  verbose = false 
)

◆ computeFromDb()

Vario * Vario::computeFromDb ( const VarioParam varioparam,
Db db,
const ECalcVario &  calcul = ECalcVario::fromKey("VARIOGRAM"),
bool  flag_sample = false,
bool  verr_mode = false,
Model model = nullptr,
int  niter_UK = 0,
bool  verbose = false 
)
static

◆ computeGeometry()

int Vario::computeGeometry ( Db db,
Vario_Order vorder,
int *  npair 
)

Calculate the geometry for a given direction

Returns
Error return code
Parameters
[in]dbDb description
[out]vorderVario_Order structure
[out]npairNumber of pairs

◆ computeGeometryMLayers()

int Vario::computeGeometryMLayers ( Db db,
VectorInt seltab,
Vario_Order vorder 
)

Determine the samples used for a variogram in multilayers framework

Returns
Error return code
Parameters
[in]dbDb description
[in]seltabNumber of sample definition (0, 1 or 2)
[out]vorderVario_Order structure

◆ computeIndic()

int Vario::computeIndic ( Db db,
const ECalcVario &  calcul = ECalcVario::fromKey("VARIOGRAM"),
bool  flag_sample = false,
bool  verr_mode = false,
const Model model = nullptr,
int  niter_UK = 0,
bool  verbose = false,
int  nfacmax = -1 
)

◆ computeVarioVect()

int Vario::computeVarioVect ( Db db,
int  ncomp 
)

Evaluate the experimental covariance for directional variables

Returns
Error return code
Parameters
[in]dbDb descriptor
[in]ncompNumber of components

◆ create()

Vario * Vario::create ( const VarioParam varioparam)
static

◆ createFromNF()

Vario * Vario::createFromNF ( const String neutralFilename,
bool  verbose = true 
)
static

◆ createReduce()

Vario * Vario::createReduce ( const Vario varioIn,
const VectorInt varcols,
const VectorInt dircols,
bool  asSymmetric = false 
)
static

◆ createRegularizeFromModel()

Vario * Vario::createRegularizeFromModel ( const Model model,
const VarioParam varioparam,
const VectorDouble ext,
const VectorInt ndisc,
const VectorDouble angles,
bool  asCov = false 
)
static

◆ createTransformYToZ()

Vario * Vario::createTransformYToZ ( const Vario varioY,
const AAnam anam 
)
static

◆ createTransformZToY()

Vario * Vario::createTransformZToY ( const Vario varioZ,
const AAnam anam 
)
static

◆ drawOnlyPositiveX()

bool Vario::drawOnlyPositiveX ( int  ivar,
int  jvar 
) const

◆ drawOnlyPositiveY()

bool Vario::drawOnlyPositiveY ( int  ivar,
int  jvar 
) const

◆ fill()

int Vario::fill ( int  idir,
const VectorDouble sw,
const VectorDouble gg,
const VectorDouble hh 
)

◆ getAllGg()

const VectorDouble & Vario::getAllGg ( int  idir = 0) const

◆ getAllHh()

const VectorDouble & Vario::getAllHh ( int  idir = 0) const

◆ getAllSw()

const VectorDouble & Vario::getAllSw ( int  idir = 0) const

◆ getAllUtilize()

const VectorDouble & Vario::getAllUtilize ( int  idir = 0) const

◆ getBipts()

const ABiTargetCheck* Vario::getBipts ( int  idir,
int  rank 
) const
inline

◆ getBiPtsNumberPerDirection()

int Vario::getBiPtsNumberPerDirection ( ) const
inline

◆ getCenter()

int Vario::getCenter ( int  ivar = 0,
int  jvar = 0,
int  idir = 0 
) const

◆ getCodir()

double Vario::getCodir ( int  idir,
int  idim 
) const

◆ getCodirs()

VectorDouble Vario::getCodirs ( int  idir) const

◆ getDateNumber()

int Vario::getDateNumber ( ) const
inline

◆ getDates() [1/2]

const VectorDouble& Vario::getDates ( ) const
inline

◆ getDates() [2/2]

double Vario::getDates ( int  idate,
int  icas 
) const
inline

◆ getDimensionNumber() [1/2]

int Vario::getDimensionNumber ( ) const
inline

◆ getDimensionNumber() [2/2]

int Vario::getDimensionNumber ( int  idir) const
inline

◆ getDirAddress()

int Vario::getDirAddress ( int  idir,
int  ivar,
int  jvar,
int  ipas,
bool  flag_abs = false,
int  sens = 0 
) const

◆ getDirectionNumber()

int Vario::getDirectionNumber ( ) const
inline

◆ getDirParam()

const DirParam& Vario::getDirParam ( int  idir) const
inline

◆ getDirSize()

int Vario::getDirSize ( int  idir) const

Returns the Dimension of internal arrays after the number of variables has been defined

Parameters
idirTarget direction
Returns

◆ getDPas()

double Vario::getDPas ( int  idir) const
inline

◆ getExtension()

void Vario::getExtension ( int  ivar,
int  jvar,
int  idir0,
int  flag_norm,
int  flag_vars,
double  distmin,
double  distmax,
double  varmin,
double  varmax,
int *  flag_hneg,
int *  flag_gneg,
double *  c0,
double *  hmin,
double *  hmax,
double *  gmin,
double *  gmax 
)

Calculate the variogram extension for a pair of variables

Parameters
[in]ivarRank of the first variable
[in]jvarRank of the second variable
[in]idir0Rank of the direction (-1 for all)
[in]flag_norm1 if the variogram must be normalized by variance
[in]flag_vars1 if the global statistics must be taken into account
[in]distminMinimum along the distance axis
[in]distmaxMaximum along the distance axis
[in]varminMinimum along the variogram (or covariance) axis
[in]varmaxMaximum along the variogram (or covariance) axis
[out]flag_hneg1 if the distance scale can be negative
[out]flag_gneg1 if the variogram scale can be negative
[out]c0Value of the variogram at the origin
[out]hminMinimum distance
[out]hmaxMaximum distance
[out]gminMinimum variogram value
[out]gmaxMaximum variogram value

◆ getFlagAsym()

bool Vario::getFlagAsym ( ) const
inline

◆ getGg()

double Vario::getGg ( int  idir = 0,
int  ivar = 0,
int  jvar = 0,
int  ipas = 0,
bool  asCov = false,
bool  flagNormalized = false 
) const

◆ getGgByIndex()

double Vario::getGgByIndex ( int  idir = 0,
int  i = 0 
) const

◆ getGgs()

VectorDouble Vario::getGgs ( int  idir = 0,
int  ivar = 0,
int  jvar = 0,
const VectorInt ipas = VectorInt() 
) const

◆ getGgVec()

VectorDouble Vario::getGgVec ( int  idir = 0,
int  ivar = 0,
int  jvar = 0,
bool  asCov = false,
bool  flagNorm = false,
bool  compress = true 
) const

Returns the vector of variogram values for a given pair of variables in a given direction

Parameters
idirDirection
ivarFirst variable
jvarSecond variable
asCovTrue if result should be provided as Covariance, False for Variogram
flagNormIf the result should be provided as a Normalized covariance / Variogram
compressWhen true, suppress lags where 'sw' <= 0
Returns
The vector of 'gg'

◆ getGmax()

double Vario::getGmax ( int  ivar = -1,
int  jvar = -1,
int  idir = -1,
bool  flagAbs = false,
bool  flagSill = false 
) const

◆ getGRange()

VectorDouble Vario::getGRange ( int  ivar = -1,
int  jvar = -1,
int  idir = -1,
bool  flagSill = false 
) const

◆ getGrincr()

double Vario::getGrincr ( int  idir,
int  idim 
)
inline

◆ getGrincrs()

VectorInt Vario::getGrincrs ( int  idir)
inline

◆ getHh()

double Vario::getHh ( int  idir = 0,
int  ivar = 0,
int  jvar = 0,
int  ipas = 0 
) const

◆ getHhByIndex()

double Vario::getHhByIndex ( int  idir = 0,
int  i = 0 
) const

◆ getHhVec()

VectorDouble Vario::getHhVec ( int  idir = 0,
int  ivar = 0,
int  jvar = 0,
bool  compress = true 
) const

Returns the vector of distances for a given pair of variables in a given direction

Parameters
idirDirection
ivarFirst variable
jvarSecond variable
compressWhen true, suppress lags where 'sw' <= 0
Returns
The vector of 'hh'

◆ getHmax()

double Vario::getHmax ( int  ivar = -1,
int  jvar = -1,
int  idir = -1 
) const

◆ getHRange()

VectorDouble Vario::getHRange ( int  ivar = -1,
int  jvar = -1,
int  idir = -1 
) const

Returns a vector with Minimum-Maximum of the Hh array

Parameters
ivarTarget variable (or -1)
jvarTarget variable (or -1)
idirTarget Direction (or -1)
Returns

◆ getIdate()

int Vario::getIdate ( int  idir) const
inline

◆ getLagNumber()

int Vario::getLagNumber ( int  idir) const
inline

◆ getLagTotalNumber()

int Vario::getLagTotalNumber ( int  idir) const

◆ getMaximumDistance()

double Vario::getMaximumDistance ( int  idir) const
inline

◆ getMean()

double Vario::getMean ( int  ivar) const

◆ getMeans()

const VectorDouble& Vario::getMeans ( ) const
inline

◆ getNext()

int Vario::getNext ( int  ivar = 0,
int  jvar = 0,
int  idir = 0,
int  shift = 1 
) const

◆ getRankFromDirAndDate()

int Vario::getRankFromDirAndDate ( int  idir,
int  idate 
)

Ask for the rank of the 'vardir' structure, given direction and date

Returns
Absolute rank (or -1 for error)
Parameters
[in]idirRank for the direction (starting from 0)
[in]idateRank for the Date (starting from 0)
Remarks
An error occurs if 'idir' is negative or larger than 'ndir'
or if 'idate' is negative or larger than 'ndate'

◆ getScale()

double Vario::getScale ( ) const
inline

◆ getSpace()

const ASpace* Vario::getSpace ( ) const
inline

◆ getSw()

double Vario::getSw ( int  idir = 0,
int  ivar = 0,
int  jvar = 0,
int  ipas = 0 
) const

◆ getSwByIndex()

double Vario::getSwByIndex ( int  idir = 0,
int  i = 0 
) const

◆ getSwVec()

VectorDouble Vario::getSwVec ( int  idir = 0,
int  ivar = 0,
int  jvar = 0,
bool  compress = true 
) const

Returns the vector of weights for a given pair of variables in a given direction

Parameters
idirDirection
ivarFirst variable
jvarSecond variable
compressWhen true, suppress lags where 'sw' <= 0
Returns
The vector of 'sw'

◆ getUtilize()

double Vario::getUtilize ( int  idir = 0,
int  ivar = 0,
int  jvar = 0,
int  ipas = 0 
) const

◆ getUtilizeByIndex()

double Vario::getUtilizeByIndex ( int  idir = 0,
int  i = 0 
) const

◆ getUtilizeVec()

VectorDouble Vario::getUtilizeVec ( int  idir = 0,
int  ivar = 0,
int  jvar = 0,
bool  compress = true 
) const

Returns the vector of utilization flags for a given pair of variables in a given direction

Parameters
idirDirection
ivarFirst variable
jvarSecond variable
compressWhen true, suppress lags where 'sw' <= 0
Returns
The vector of 'utilize'

◆ getVar()

double Vario::getVar ( int  ivar,
int  jvar 
) const

◆ getVarAddress()

int Vario::getVarAddress ( int  ivar,
int  jvar 
) const

◆ getVariableNumber()

int Vario::getVariableNumber ( ) const
inline

◆ getVarIndex()

double Vario::getVarIndex ( int  ijvar) const

◆ getVarioParam()

const VarioParam& Vario::getVarioParam ( ) const
inline

◆ getVars()

const VectorDouble& Vario::getVars ( ) const
inline

◆ getVec()

VectorVectorDouble Vario::getVec ( int  idir = 0,
int  ivar = 0,
int  jvar = 0 
) const

Returns a triple array of values: 0-Weight; 1-Distance; 2-Variogram

Parameters
idirTarget Direction
ivarTarget first variable
jvarTarget second variable
Returns

◆ hasDate()

bool Vario::hasDate ( ) const
inline

◆ internalDirectionResize()

void Vario::internalDirectionResize ( int  ndir = 0,
bool  flagDirs = true 
)

◆ internalVariableResize()

int Vario::internalVariableResize ( )

◆ isDefinedForGrid()

bool Vario::isDefinedForGrid ( ) const
inline

◆ keepPair()

bool Vario::keepPair ( int  idir,
SpaceTarget T1,
SpaceTarget T2,
double *  dist 
)

◆ operator=()

Vario & Vario::operator= ( const Vario r)

◆ patchCenter()

void Vario::patchCenter ( int  idir,
int  nech,
double  rho 
)

◆ prepare()

int Vario::prepare ( const ECalcVario &  calcul = ECalcVario::fromKey("VARIOGRAM"),
bool  defineList = true 
)

◆ regularizeFromDbGrid()

int Vario::regularizeFromDbGrid ( Model model,
const Db db,
const CovCalcMode mode = nullptr 
)

Calculate the regularized model as an experimental variogram

Returns
Error return code
Parameters
[in]modelModel structure
[in]dbDb discretization structure
[in]modeCovCalcMode structure

◆ regularizeFromModel()

int Vario::regularizeFromModel ( const Model model,
const VectorDouble ext,
const VectorInt ndisc,
const VectorDouble angles = VectorDouble(),
const CovCalcMode mode = nullptr,
bool  asCov = false 
)

Calculate the regularized model as an experimental variogram

Returns
Error return code
Parameters
[in]modelModel structure
[in]extVector of Block extension
[in]ndiscVector of discretization counts
[in]anglesVector of rotation angles (optional)
[in]modeCovCalcMode structure
[in]asCovWhen true; produces a covariance

◆ resetReduce()

void Vario::resetReduce ( const VectorInt varcols,
const VectorInt dircols,
bool  asSymmetric = false 
)

Reduce the current variogram by keeping a subset of variables and/or directions

Parameters
varcolsVector of variable ranks (starting from 0)
dircolsVector of direction ranks (starting from 0)
asSymmetricTurn the result into as Symmetrical function (i.e. variogram)

◆ sampleModel()

int Vario::sampleModel ( Model model,
const CovCalcMode mode = nullptr 
)

Calculates variogram values by sampling a model

Returns
Error return code
Parameters
[in]modelModel structure
[in]modeCovCalcMode structure

◆ setCalculName()

void Vario::setCalculName ( const String  calcul_name)

◆ setDb()

void Vario::setDb ( Db db)

◆ setGg()

void Vario::setGg ( int  idir,
int  ivar,
int  jvar,
int  ipas,
double  gg 
)

◆ setGgByIndex()

void Vario::setGgByIndex ( int  idir,
int  i,
double  gg 
)

◆ setGgs()

VectorDouble Vario::setGgs ( int  idir,
int  ivar,
int  jvar,
const VectorInt ipas,
const VectorDouble values 
)

◆ setGgVec()

void Vario::setGgVec ( int  idir,
int  ivar,
int  jvar,
const VectorDouble gg 
)

◆ setHh()

void Vario::setHh ( int  idir,
int  ivar,
int  jvar,
int  ipas,
double  hh 
)

◆ setHhByIndex()

void Vario::setHhByIndex ( int  idir,
int  i,
double  hh 
)

◆ setHhVec()

void Vario::setHhVec ( int  idir,
int  ivar,
int  jvar,
const VectorDouble hh 
)

◆ setMean()

void Vario::setMean ( double  mean,
int  ivar = 0 
)

◆ setMeans()

void Vario::setMeans ( const VectorDouble means)

◆ setNVar()

void Vario::setNVar ( int  nvar)
inline

◆ setScale()

void Vario::setScale ( double  scale)
inline

◆ setSw()

void Vario::setSw ( int  idir,
int  ivar,
int  jvar,
int  ipas,
double  sw 
)

◆ setSwByIndex()

void Vario::setSwByIndex ( int  idir,
int  i,
double  sw 
)

◆ setSwVec()

void Vario::setSwVec ( int  idir,
int  ivar,
int  jvar,
const VectorDouble sw 
)

◆ setUtilize()

void Vario::setUtilize ( int  idir,
int  ivar,
int  jvar,
int  ipas,
double  utilize 
)

◆ setUtilizeByIndex()

void Vario::setUtilizeByIndex ( int  idir,
int  i,
double  utilize 
)

◆ setVar()

void Vario::setVar ( double  value,
int  ivar = 0,
int  jvar = 0 
)

◆ setVarIndex()

void Vario::setVarIndex ( int  ijvar,
double  value 
)

◆ setVars()

void Vario::setVars ( const VectorDouble vars)

◆ toString()

String Vario::toString ( const AStringFormat strfmt = nullptr) const
overridevirtual

AStringable Interface.

Reimplemented from AStringable.

◆ transformCut()

int Vario::transformCut ( int  nh,
double  ycut 
)

Update the experimental variogram of the completed variable starting from the experimental variogram of the truncated variable This only functions in the monovariate case

Parameters
[in]nhNumber of Hermite polynomials
[in]ycutTruncation (lowest) value
Returns
Error return code

◆ transformYToZ()

int Vario::transformYToZ ( const AAnam anam)

Calculate the experimental variogram of the Raw starting from the Model of the Gaussian variable

Returns
Error return code
Parameters
[in]anamPoint anamorphosis

◆ transformZToY()

int Vario::transformZToY ( const AAnam anam)

Transform the experimental variogram from raw to gaussian space

Returns
Error return code
Parameters
[in]anamPoint Hermite anamorphosis

◆ updateGgByIndex()

void Vario::updateGgByIndex ( int  idir,
int  i,
double  gg 
)

◆ updateHhByIndex()

void Vario::updateHhByIndex ( int  idir,
int  i,
double  hh 
)

◆ updateSwByIndex()

void Vario::updateSwByIndex ( int  idir,
int  i,
double  sw 
)

Member Data Documentation

◆ DECLARE_TOTL

Vario::DECLARE_TOTL

ICloneable interface.

Has a specific implementation in the Target language


The documentation for this class was generated from the following files: