1.1.0
CCC
 
ACovAnisoList Class Reference

This class describes the Covariance as a list of elementary covariances (see CovAniso.hpp for more details) where the calculation rule is simple: the returned value is the sum of each elementary (active) covariance function. More...

#include <ACovAnisoList.hpp>

Inheritance diagram for ACovAnisoList:
ACov ICloneable ASpaceObject AStringable CovLMC CovLMGradient CovLMCAnamorphosis CovLMCConvolution CovLMCTapering

Public Member Functions

 ACovAnisoList (const ASpace *space=nullptr)
 
 ACovAnisoList (const ACovAnisoList &r)
 
ACovAnisoListoperator= (const ACovAnisoList &r)
 
virtual ~ACovAnisoList ()
 
virtual bool isConsistent (const ASpace *space) const override
 ICloneable interface. More...
 
virtual int getNVariables () const override
 Interface for ACov. More...
 
virtual bool isIndexable () const override
 
virtual bool isNoStat () const override
 
virtual const ANoStatgetNoStat () const override
 
virtual ANoStatgetNoStatModify () const override
 
virtual double eval0 (int ivar=0, int jvar=0, const CovCalcMode *mode=nullptr) const override
 Calculate the covariance between two variables for 0-distance (stationary case) More...
 
virtual double eval (const SpacePoint &p1, const SpacePoint &p2, int ivar=0, int jvar=0, const CovCalcMode *mode=nullptr) const override
 Calculate the covariance between two variables and two points (general case) More...
 
virtual void eval0MatInPlace (MatrixSquareGeneral &mat, const CovCalcMode *mode=nullptr) const override
 
virtual void evalMatInPlace (const SpacePoint &p1, const SpacePoint &p2, MatrixSquareGeneral &mat, const CovCalcMode *mode=nullptr) const override
 
virtual void evalMatOptimInPlace (int icas1, int iech1, int icas2, int iech2, MatrixSquareGeneral &mat, const CovCalcMode *mode=nullptr) const override
 
virtual void updateCovByPoints (int icas1, int iech1, int icas2, int iech2) override
 
virtual void updateCovByMesh (int imesh) override
 
virtual String toString (const AStringFormat *strfmt=nullptr) const override
 Interface for AStringable Interface. More...
 
virtual void addCov (const CovAniso *cov)
 ACovAnisoList Interface. More...
 
virtual bool hasAnam () const
 
virtual const AAnamgetAnam () const
 
virtual void setActiveFactor (int)
 
virtual int getActiveFactor () const
 
virtual int getAnamNClass () const
 
void addCovList (const ACovAnisoList *covs)
 
void delCov (unsigned int i)
 
void delAllCov ()
 
void setFiltered (unsigned int i, bool filtered)
 
int getCovaNumber (bool skipNugget=false) const
 
bool isFiltered (unsigned int i) const
 
bool hasRange () const
 
bool isStationary () const
 
double getMaximumDistance () const
 
double getTotalSill (int ivar, int jvar) const
 
MatrixSquareGeneral getTotalSill () const
 
void normalize (double sill=1., int ivar=0, int jvar=0)
 
VectorInt getActiveCovList () const
 
VectorInt getAllActiveCovList () const
 
bool isAllActiveCovList () const
 
const CovAnisogetCova (int icov) const
 TODO : to be removed (encapsulation) More...
 
CovAnisogetCova (int icov)
 
void setCova (int icov, CovAniso *covs)
 
const ECov & getType (int icov) const
 
String getCovName (int icov) const
 
double getParam (unsigned int icov) const
 
const MatrixSquareSymmetricgetSill (unsigned int icov) const
 
double getSill (unsigned int icov, int ivar, int jvar) const
 
int getGradParamNumber (unsigned int icov) const
 
void setSill (unsigned int icov, int ivar, int jvar, double value)
 
void setType (unsigned int icov, const ECov &type)
 
void setParam (unsigned int icov, double value)
 
CovAniso extractCova (int icov) const
 
int getCovaMinIRFOrder () const
 
void optimizationPreProcess (const std::vector< SpacePoint > &vec) const
 
void optimizationPostProcess () const
 
void optimizationSetTarget (const SpacePoint &pt) const
 
void evalOptimInPlace (VectorDouble &res, int ivar=0, int jvar=0, const CovCalcMode *mode=nullptr) const
 
VectorVectorDouble evalCovMatrixOptim (const Db *db1, const Db *db2, int ivar, int jvar, const CovCalcMode *mode) const
 
void copyCovContext (const CovContext &ctxt)
 
bool hasNugget () const
 
const ACovAnisoListcreateReduce (const VectorInt &validVars) const
 
int addNoStat (const ANoStat *anostat)
 
int getNoStatElemNumber () const
 
const EConsElem & getNoStatElemType (int ipar) const
 
int addNoStatElem (int igrf, int icov, const EConsElem &type, int iv1, int iv2)
 
int addNoStatElems (const VectorString &codes)
 
CovParamId getCovParamId (int ipar) const
 
int getNoStatElemIcov (int ipar) const
 
- Public Member Functions inherited from ACov
 ACov (const ASpace *space=nullptr)
 
 ACov (const ACov &r)
 
ACovoperator= (const ACov &r)
 
virtual ~ACov ()
 
virtual bool isOptimEnabled () const
 Tell if the use of Optimization is enabled or not. More...
 
virtual double evalCovOnSphere (double, int, bool) const
 
virtual double evalSpectrum (const VectorDouble &, int, int) const
 
void setOptimEnabled (bool isOptimEnabled)
 
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
 
MatrixSquareGeneral eval0Mat (const CovCalcMode *mode=nullptr) const
 
MatrixSquareGeneral evalMat (const SpacePoint &p1, const SpacePoint &p2, const CovCalcMode *mode=nullptr) 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 evalIvarNpas (const VectorDouble &vec_step, const VectorDouble &dir=VectorDouble(), int ivar=0, int jvar=0, const CovCalcMode *mode=nullptr) const
 
MatrixSquareGeneral evalNvarIpas (double step, const VectorDouble &dir=VectorDouble(), const CovCalcMode *mode=nullptr) const
 
MatrixSquareGeneral 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 evalIsoIvarNpas (const VectorDouble &vec_step, int ivar=0, int jvar=0, const CovCalcMode *mode=nullptr) const
 
MatrixSquareGeneral 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
 
MatrixSquareGeneral 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
 
MatrixSquareGeneral evalCxvM (const SpacePoint &p1, const VectorDouble &ext, const VectorInt &ndisc, const VectorDouble &angles=VectorDouble(), const VectorDouble &x0=VectorDouble(), const CovCalcMode *mode=nullptr) const
 
VectorDouble evalPointToDb (const SpacePoint &p1, const Db *db2, int ivar=0, int jvar=0, bool useSel=true, const VectorInt &nbgh2=VectorInt(), const CovCalcMode *mode=nullptr) const
 
VectorDouble evalPointToDbAsSP (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, 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
 
MatrixRectangular evalCovMatrix (Db *db1_arg, Db *db2_arg=nullptr, int ivar=0, int jvar=0, const VectorInt &nbgh1=VectorInt(), const VectorInt &nbgh2=VectorInt(), const CovCalcMode *mode=nullptr)
 
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)
 
ASpaceObjectoperator= (const ASpaceObject &r)
 
virtual ~ASpaceObject ()
 
const ASpacegetSpace () 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...
 
unsigned int getNDim () const
 Shortcuts to ASpace methods. More...
 
const VectorDoublegetOrigin () 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...
 
double getDistance1D (const SpacePoint &p1, const SpacePoint &p2, int idim) const
 Return the distance along one direction between two space points. 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)
 
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
 

Detailed Description

This class describes the Covariance as a list of elementary covariances (see CovAniso.hpp for more details) where the calculation rule is simple: the returned value is the sum of each elementary (active) covariance function.

This class also carry two other important informations:

  • a vector giving the status of each elementary covariance item: it may be active or filtered
  • a complex structure allowing each parameter (range, sill, anisotropy angle, ...) of each of the elementary covariances to be non-stationary (to have a value which depends on the location). For more details, see ANoStat.hpp.

Constructor & Destructor Documentation

ACovAnisoList::ACovAnisoList ( const ASpace space = nullptr)
ACovAnisoList::ACovAnisoList ( const ACovAnisoList r)
ACovAnisoList::~ACovAnisoList ( )
virtual

Member Function Documentation

void ACovAnisoList::addCov ( const CovAniso cov)
virtual

ACovAnisoList Interface.

Reimplemented in CovLMCAnamorphosis, and CovLMGradient.

void ACovAnisoList::addCovList ( const ACovAnisoList covs)
int ACovAnisoList::addNoStat ( const ANoStat anostat)

Define Non-stationary parameters

Parameters
anostatANoStat pointer will be duplicated
Returns
Error return code
int ACovAnisoList::addNoStatElem ( int  igrf,
int  icov,
const EConsElem &  type,
int  iv1,
int  iv2 
)
int ACovAnisoList::addNoStatElems ( const VectorString codes)
void ACovAnisoList::copyCovContext ( const CovContext ctxt)
const ACovAnisoList * ACovAnisoList::createReduce ( const VectorInt validVars) const
void ACovAnisoList::delAllCov ( )
void ACovAnisoList::delCov ( unsigned int  i)
double ACovAnisoList::eval ( const SpacePoint p1,
const SpacePoint p2,
int  ivar = 0,
int  jvar = 0,
const CovCalcMode mode = nullptr 
) const
overridevirtual

Calculate the covariance between two variables and two points (general case)

Implements ACov.

Reimplemented in CovLMCConvolution, CovLMCTapering, and CovLMCAnamorphosis.

double ACovAnisoList::eval0 ( int  ivar = 0,
int  jvar = 0,
const CovCalcMode mode = nullptr 
) const
overridevirtual

Calculate the covariance between two variables for 0-distance (stationary case)

Implements ACov.

Reimplemented in CovLMCConvolution, CovLMCTapering, and CovLMCAnamorphosis.

void ACovAnisoList::eval0MatInPlace ( MatrixSquareGeneral mat,
const CovCalcMode mode = nullptr 
) const
overridevirtual

Calculate the Matrix of covariance for zero distance

Parameters
matCovariance matrix (Dimension: nvar * nvar)
modeCalculation Options
Remarks
: Matrix 'mat' should be dimensioned and initialized beforehand

Reimplemented from ACov.

Reimplemented in CovLMCConvolution, CovLMCTapering, CovLMCAnamorphosis, and CovLMGradient.

VectorVectorDouble ACovAnisoList::evalCovMatrixOptim ( const Db db1,
const Db db2,
int  ivar,
int  jvar,
const CovCalcMode mode 
) const

Evaluate the set of covariance vectors between samples of input 'db1' and samples of output 'db2'

Parameters
db1Input Db
db2Output db
ivarRank of the first variable
jvarRank of the second variable
modeCovCalcMode structure
Returns
void ACovAnisoList::evalMatInPlace ( const SpacePoint p1,
const SpacePoint p2,
MatrixSquareGeneral mat,
const CovCalcMode mode = nullptr 
) const
overridevirtual

Calculate the Matrix of covariance between two space points

Parameters
p1Reference of the first space point
p2Reference of the second space point
matCovariance matrix (Dimension: nvar * nvar)
modeCalculation Options
Remarks
: Matrix 'mat' should be dimensioned and initialized beforehand

Reimplemented from ACov.

Reimplemented in CovLMCConvolution, CovLMCTapering, CovLMCAnamorphosis, and CovLMGradient.

void ACovAnisoList::evalMatOptimInPlace ( int  icas1,
int  iech1,
int  icas2,
int  iech2,
MatrixSquareGeneral mat,
const CovCalcMode mode = nullptr 
) const
overridevirtual

Calculate the Matrix of covariance between two elements of two Dbs (defined beforehand)

Parameters
icas1Origin of the Db containing the first point
iech1Rank of the first point
icas2Origin of the Db containing the second point
iech2Rank of the second point
matCovariance matrix (Dimension: nvar * nvar)
modeCalculation Options
Remarks
: Matrix 'mat' should be dimensioned and initialized beforehand

Implements ACov.

void ACovAnisoList::evalOptimInPlace ( VectorDouble res,
int  ivar = 0,
int  jvar = 0,
const CovCalcMode mode = nullptr 
) const
CovAniso ACovAnisoList::extractCova ( int  icov) const
VectorInt ACovAnisoList::getActiveCovList ( ) const
virtual int ACovAnisoList::getActiveFactor ( ) const
inlinevirtual

Reimplemented in CovLMCAnamorphosis.

VectorInt ACovAnisoList::getAllActiveCovList ( ) const
virtual const AAnam* ACovAnisoList::getAnam ( ) const
inlinevirtual

Reimplemented in CovLMCAnamorphosis.

virtual int ACovAnisoList::getAnamNClass ( ) const
inlinevirtual

Reimplemented in CovLMCAnamorphosis.

const CovAniso * ACovAnisoList::getCova ( int  icov) const

TODO : to be removed (encapsulation)

CovAniso * ACovAnisoList::getCova ( int  icov)
int ACovAnisoList::getCovaMinIRFOrder ( ) const
Returns
The Minimum IRF-order induced by the covariances
int ACovAnisoList::getCovaNumber ( bool  skipNugget = false) const
String ACovAnisoList::getCovName ( int  icov) const
CovParamId ACovAnisoList::getCovParamId ( int  ipar) const
int ACovAnisoList::getGradParamNumber ( unsigned int  icov) const
double ACovAnisoList::getMaximumDistance ( ) const

Returns the largest range (in any direction in the heterotopic case)

Returns
virtual const ANoStat* ACovAnisoList::getNoStat ( ) const
inlineoverridevirtual

Reimplemented from ACov.

int ACovAnisoList::getNoStatElemIcov ( int  ipar) const
int ACovAnisoList::getNoStatElemNumber ( ) const
const EConsElem & ACovAnisoList::getNoStatElemType ( int  ipar) const
virtual ANoStat* ACovAnisoList::getNoStatModify ( ) const
inlineoverridevirtual

Reimplemented from ACov.

int ACovAnisoList::getNVariables ( ) const
overridevirtual

Interface for ACov.

Implements ACov.

double ACovAnisoList::getParam ( unsigned int  icov) const
const MatrixSquareSymmetric & ACovAnisoList::getSill ( unsigned int  icov) const
double ACovAnisoList::getSill ( unsigned int  icov,
int  ivar,
int  jvar 
) const
double ACovAnisoList::getTotalSill ( int  ivar,
int  jvar 
) const

Calculate the total sill of the model for given pair of variables Returns TEST as soon as one structure has no sill

Parameters
ivarRank of the first variable
jvarRank of the second variable
MatrixSquareGeneral ACovAnisoList::getTotalSill ( ) const
const ECov & ACovAnisoList::getType ( int  icov) const
virtual bool ACovAnisoList::hasAnam ( ) const
inlinevirtual

Reimplemented in CovLMCAnamorphosis.

bool ACovAnisoList::hasNugget ( ) const
bool ACovAnisoList::hasRange ( ) const
bool ACovAnisoList::isAllActiveCovList ( ) const
bool ACovAnisoList::isConsistent ( const ASpace space) const
overridevirtual

ICloneable interface.

Interface for ASpaceObject

TODO : ACovAnisoList::isConsistent

Implements ASpaceObject.

bool ACovAnisoList::isFiltered ( unsigned int  i) const
virtual bool ACovAnisoList::isIndexable ( ) const
inlineoverridevirtual

Reimplemented from ACov.

virtual bool ACovAnisoList::isNoStat ( ) const
inlineoverridevirtual

Reimplemented from ACov.

bool ACovAnisoList::isStationary ( ) const
void ACovAnisoList::normalize ( double  sill = 1.,
int  ivar = 0,
int  jvar = 0 
)
ACovAnisoList & ACovAnisoList::operator= ( const ACovAnisoList r)
void ACovAnisoList::optimizationPostProcess ( ) const
void ACovAnisoList::optimizationPreProcess ( const std::vector< SpacePoint > &  vec) const
void ACovAnisoList::optimizationSetTarget ( const SpacePoint pt) const
virtual void ACovAnisoList::setActiveFactor ( int  )
inlinevirtual

Reimplemented in CovLMCAnamorphosis.

void ACovAnisoList::setCova ( int  icov,
CovAniso covs 
)
void ACovAnisoList::setFiltered ( unsigned int  i,
bool  filtered 
)
void ACovAnisoList::setParam ( unsigned int  icov,
double  value 
)
void ACovAnisoList::setSill ( unsigned int  icov,
int  ivar,
int  jvar,
double  value 
)
void ACovAnisoList::setType ( unsigned int  icov,
const ECov &  type 
)
String ACovAnisoList::toString ( const AStringFormat strfmt = nullptr) const
overridevirtual

Interface for AStringable Interface.

Reimplemented from ASpaceObject.

Reimplemented in CovLMCConvolution, CovLMCTapering, and CovLMCAnamorphosis.

void ACovAnisoList::updateCovByMesh ( int  imesh)
overridevirtual

Update the Model according to the Non-stationary parameters

Parameters
imeshRank of the target mesh

Reimplemented from ACov.

void ACovAnisoList::updateCovByPoints ( int  icas1,
int  iech1,
int  icas2,
int  iech2 
)
overridevirtual

Update the Model according to the Non-stationary parameters

Parameters
icas1Type of first Db: 1 for Input; 2 for Output
iech1Rank of the target within Db1 (or -1)
icas2Type of first Db: 1 for Input; 2 for Output
iech2Rank of the target within Dbout (or -2)

Reimplemented from ACov.


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