gstlearn  1.0.0
CCC
DriftList Class Reference

#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 VectorDoublegetDriftCoef () const
 
double getDriftCoef (int ivar, int il, int ib) const
 
void setDriftCoef (int ivar, int il, int ib, double value)
 
void resetDriftCoeff ()
 
VectorDouble getDriftCoefByPart (int ivar, int ib) const
 
void setDriftCoefByPart (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
 
VectorDouble evalDrifts (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 updateDriftList ()
 
- 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
 

Protected Attributes

bool _flagLinked
 
VectorDouble _driftCoef
 
std::vector< ADrift * > _drifts
 
VectorBool _filtered
 
CovContext _ctxt
 

Private Member Functions

bool _isDriftIndexValid (int i) const
 
bool _isDriftEquationValid (int ib) const
 
int _getAddress (int ivar, int il, int ib) const
 

Constructor & Destructor Documentation

◆ DriftList() [1/2]

DriftList::DriftList ( const CovContext ctxt = CovContext())

◆ DriftList() [2/2]

DriftList::DriftList ( const DriftList r)

◆ ~DriftList()

DriftList::~DriftList ( )
virtual

Member Function Documentation

◆ _getAddress()

int DriftList::_getAddress ( int  ivar,
int  il,
int  ib 
) const
inlineprivate

◆ _isDriftEquationValid()

bool DriftList::_isDriftEquationValid ( int  ib) const
private

◆ _isDriftIndexValid()

bool DriftList::_isDriftIndexValid ( int  i) const
private

◆ addDrift()

void DriftList::addDrift ( const ADrift drift)

◆ copyCovContext()

void DriftList::copyCovContext ( const CovContext ctxt)
inline

◆ delAllDrifts()

void DriftList::delAllDrifts ( )

◆ delDrift()

void DriftList::delDrift ( unsigned int  i)

◆ evalDrifts()

VectorDouble DriftList::evalDrifts ( 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

◆ getDrift() [1/3]

double DriftList::getDrift ( const Db db,
int  ib,
int  iech 
) const

◆ getDrift() [2/3]

ADrift * DriftList::getDrift ( int  il)

◆ getDrift() [3/3]

const ADrift * DriftList::getDrift ( int  il) const

TODO : to be removed (encapsulation)

◆ getDriftByColumn()

VectorDouble DriftList::getDriftByColumn ( const Db db,
int  ib,
bool  useSel = true 
) const

◆ getDriftBySample()

VectorDouble DriftList::getDriftBySample ( const Db db,
int  iech 
) const

◆ getDriftCoef() [1/2]

const VectorDouble& DriftList::getDriftCoef ( ) const
inline

◆ getDriftCoef() [2/2]

double DriftList::getDriftCoef ( 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

◆ getDriftCoefByPart()

VectorDouble DriftList::getDriftCoefByPart ( int  ivar,
int  ib 
) const

◆ getDriftEquationNumber()

int DriftList::getDriftEquationNumber ( ) const

◆ getDriftMaxIRFOrder()

int DriftList::getDriftMaxIRFOrder ( void  ) const
Returns
Maximum IRF-order (-1 for order-2 stationarity)

◆ getDriftName()

String DriftList::getDriftName ( int  il) const

◆ getDriftNumber()

int DriftList::getDriftNumber ( ) const
inline

◆ getDrifts()

VectorVectorDouble DriftList::getDrifts ( const Db db,
bool  useSel = true 
) const

◆ getFiltered()

const VectorBool& DriftList::getFiltered ( ) const
inline

◆ getNVariables()

int DriftList::getNVariables ( ) const
inline

◆ getRankFex()

int DriftList::getRankFex ( int  il) const

beurk :(

◆ hasExternalDrift()

bool DriftList::hasExternalDrift ( ) const

◆ isDriftDefined()

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

◆ isDriftDifferentDefined()

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

◆ isFiltered()

bool DriftList::isFiltered ( int  i) const

◆ isFlagLinked()

bool DriftList::isFlagLinked ( ) const
inline

◆ isValid()

bool DriftList::isValid ( ) const

Check that the set of drift functions is valid

Returns

◆ operator=()

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

◆ resetDriftCoeff()

void DriftList::resetDriftCoeff ( )
inline

◆ setDriftCoef()

void DriftList::setDriftCoef ( int  ivar,
int  il,
int  ib,
double  value 
)
inline

◆ setDriftCoefByPart()

void DriftList::setDriftCoefByPart ( int  ivar,
int  ib,
const VectorDouble coef 
)

◆ setFiltered() [1/2]

void DriftList::setFiltered ( const VectorBool filtered)
inline

◆ setFiltered() [2/2]

void DriftList::setFiltered ( int  i,
bool  filter 
)

◆ setFlagLinked()

void DriftList::setFlagLinked ( bool  flagLinked)
inline

◆ toString()

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

ICloneable interface.

AStringable Interface

Reimplemented from AStringable.

◆ updateDriftList()

void DriftList::updateDriftList ( )

Member Data Documentation

◆ _ctxt

CovContext DriftList::_ctxt
protected

◆ _driftCoef

VectorDouble DriftList::_driftCoef
protected

◆ _drifts

std::vector<ADrift*> DriftList::_drifts
protected

◆ _filtered

VectorBool DriftList::_filtered
protected

◆ _flagLinked

bool DriftList::_flagLinked
protected

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