1.2.1
CCC
 
DriftList Class Reference

This class provides the information on Drift part of the Model. The drift plays the role of the average of the target Random Function which may be constant or vary as a function with low frequency variations (by opposition to the complementary part of the Spatial Characteristics which is described by its Covariance) More...

#include <DriftList.hpp>

Inheritance diagram for DriftList:
AStringable ICloneable

Public Member Functions

 DriftList (const CovContext &ctxt=CovContext())
 
 DriftList (const DriftList &r)
 
DriftListoperator= (const DriftList &r)
 
virtual ~DriftList ()
 
virtual String toString (const AStringFormat *strfmt=nullptr) const override
 ICloneable interface. More...
 
int getNVariables () const
 
int getDriftNumber () const
 
void addDrift (const ADrift *drift)
 
void delDrift (unsigned int i)
 
void delAllDrifts ()
 
const VectorBoolgetFiltered () const
 
void setFiltered (const VectorBool &filtered)
 
bool isFiltered (int i) const
 
void setFiltered (int i, bool filter)
 
int getDriftEquationNumber () const
 
bool hasExternalDrift () const
 
bool isValid () const
 
const ADriftgetDrift (int il) const
 TODO : to be removed (encapsulation) More...
 
ADriftgetDrift (int il)
 
int getRankFex (int il) const
 beurk :( More...
 
String getDriftName (int il) const
 
const VectorDoublegetDriftCL () const
 
const VectorDoublegetBetaHat () const
 
double getDriftCL (int ivar, int il, int ib) const
 
void setDriftCL (int ivar, int il, int ib, double value)
 
void resetDriftCL ()
 
VectorDouble getDriftCLByPart (int ivar, int ib) const
 
void setDriftCLByPart (int ivar, int ib, const VectorDouble &coef)
 
double getDrift (const Db *db, int ib, int iech) const
 
VectorDouble getDriftByColumn (const Db *db, int ib, bool useSel=true) const
 
VectorDouble getDriftBySample (const Db *db, int iech) const
 
VectorVectorDouble getDrifts (const Db *db, bool useSel=true) const
 
bool isFlagLinked () const
 
double evalDriftCoef (const Db *db, int iech, const VectorDouble &coeffs) const
 
VectorDouble evalDriftCoefVec (const Db *db, const VectorDouble &coeffs, bool useSel=false) const
 
int getDriftMaxIRFOrder (void) const
 
bool isDriftDefined (const VectorInt &powers, int rank_fex=0) const
 
bool isDriftDifferentDefined (const VectorInt &powers, int rank_fex=-1) const
 
void copyCovContext (const CovContext &ctxt)
 
void setFlagLinked (bool flagLinked)
 
void setBetaHat (const VectorDouble &betaHat)
 
void updateDriftList ()
 
double evalDrift (const Db *db, int iech, int il, const ECalcMember &member=ECalcMember::fromKey("LHS")) const
 
VectorDouble evalDriftVec (const Db *db, int iech, const ECalcMember &member=ECalcMember::fromKey("LHS")) const
 
void evalDriftVecInPlace (const Db *db, int iech, const ECalcMember &member, VectorDouble &drftab) const
 
MatrixRectangular evalDriftMat (const Db *db, const ECalcMember &member=ECalcMember::fromKey("LHS"))
 
double evalDriftValue (int ivar, int ib, const VectorDouble &drftab) const
 
- 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 provides the information on Drift part of the Model. The drift plays the role of the average of the target Random Function which may be constant or vary as a function with low frequency variations (by opposition to the complementary part of the Spatial Characteristics which is described by its Covariance)

This class essentially contains a list of basic (active)e drift functions: see ADrift.hpp for details.

This class also carry other important informations:

  • a vector giving the status of each basic drift functions: it may be active or filtered
  • some additional information defining some relationship between the basic drift function: this is used for the special case where the different Random Functions obey to algebraic relations.

Constructor & Destructor Documentation

DriftList::DriftList ( const CovContext ctxt = CovContext())
DriftList::DriftList ( const DriftList r)
DriftList::~DriftList ( )
virtual

Member Function Documentation

void DriftList::addDrift ( const ADrift drift)
void DriftList::copyCovContext ( const CovContext ctxt)
inline
void DriftList::delAllDrifts ( )
void DriftList::delDrift ( unsigned int  i)
double DriftList::evalDrift ( const Db db,
int  iech,
int  il,
const ECalcMember &  member = ECalcMember::fromKey("LHS") 
) const

Evaluate a given drift function for a given sample

Parameters
dbDb structure
iechRank of the target sample
ilRank of the drift function
memberMember type (used to check filtering)
Returns
double DriftList::evalDriftCoef ( const Db db,
int  iech,
const VectorDouble coeffs 
) const
VectorDouble DriftList::evalDriftCoefVec ( const Db db,
const VectorDouble coeffs,
bool  useSel = false 
) const

Evaluate the Linear combination of drift terms at each sample of a Db

Parameters
dbTarget Db
coeffsVector of coefficients (must have dimension of number of drift elements)
useSelTrue if the selection must be taken into account
Returns
MatrixRectangular DriftList::evalDriftMat ( const Db db,
const ECalcMember &  member = ECalcMember::fromKey("LHS") 
)

Establish the drift rectangular matrix for a given Db

Returns
Returned matrix (Dimension/ nrows = nvar * nech; ncols = nfeq * nvar)
Parameters
[in]dbDb structure
[in]memberMember of the Kriging System (ECalcMember)
Remarks
: The function can be used for monovariate of multivariate.
: It is based on the set of ACTIVE samples... but does not take
: heterotpy into account.
double DriftList::evalDriftValue ( int  ivar,
int  ib,
const VectorDouble drftab 
) const
VectorDouble DriftList::evalDriftVec ( const Db db,
int  iech,
const ECalcMember &  member = ECalcMember::fromKey("LHS") 
) const
void DriftList::evalDriftVecInPlace ( const Db db,
int  iech,
const ECalcMember &  member,
VectorDouble drftab 
) const
const VectorDouble& DriftList::getBetaHat ( ) const
inline
const ADrift * DriftList::getDrift ( int  il) const

TODO : to be removed (encapsulation)

ADrift * DriftList::getDrift ( int  il)
double DriftList::getDrift ( const Db db,
int  ib,
int  iech 
) const
VectorDouble DriftList::getDriftByColumn ( const Db db,
int  ib,
bool  useSel = true 
) const
VectorDouble DriftList::getDriftBySample ( const Db db,
int  iech 
) const
const VectorDouble& DriftList::getDriftCL ( ) const
inline
double DriftList::getDriftCL ( int  ivar,
int  il,
int  ib 
) const
inline
Parameters
ivarRank of the variable (_nVar)
ilRank of the drift function
ibRank of the drift equation (_driftEquationNumber)
Returns
VectorDouble DriftList::getDriftCLByPart ( int  ivar,
int  ib 
) const
int DriftList::getDriftEquationNumber ( ) const
int DriftList::getDriftMaxIRFOrder ( void  ) const
Returns
Maximum IRF-order (-1 for order-2 stationarity)
String DriftList::getDriftName ( int  il) const
int DriftList::getDriftNumber ( ) const
inline
VectorVectorDouble DriftList::getDrifts ( const Db db,
bool  useSel = true 
) const
const VectorBool& DriftList::getFiltered ( ) const
inline
int DriftList::getNVariables ( ) const
inline
int DriftList::getRankFex ( int  il) const

beurk :(

bool DriftList::hasExternalDrift ( ) const
bool DriftList::isDriftDefined ( const VectorInt powers,
int  rank_fex = 0 
) const

Check if a given drift type is defined among the drift functions

Parameters
powersVector of exponents for monomials
rank_fexRank of the variable for external dift
Returns
bool DriftList::isDriftDifferentDefined ( const VectorInt powers,
int  rank_fex = -1 
) const

Check if at least one drift function exists whose type is different from the target type

Parameters
powersVector of exponent for monomials of a polynomial drift
rank_fexRank of the variable for external Drift
Returns
bool DriftList::isFiltered ( int  i) const
bool DriftList::isFlagLinked ( ) const
inline
bool DriftList::isValid ( ) const

Check that the set of drift functions is valid

Returns
DriftList & DriftList::operator= ( const DriftList r)
void DriftList::resetDriftCL ( )
inline
void DriftList::setBetaHat ( const VectorDouble betaHat)
inline
void DriftList::setDriftCL ( int  ivar,
int  il,
int  ib,
double  value 
)
inline
void DriftList::setDriftCLByPart ( int  ivar,
int  ib,
const VectorDouble coef 
)
void DriftList::setFiltered ( const VectorBool filtered)
inline
void DriftList::setFiltered ( int  i,
bool  filter 
)
void DriftList::setFlagLinked ( bool  flagLinked)
inline
String DriftList::toString ( const AStringFormat strfmt = nullptr) const
overridevirtual

ICloneable interface.

AStringable Interface

Reimplemented from AStringable.

void DriftList::updateDriftList ( )

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