1.2.2
CCC
 
Selectivity Class Reference

#include <Selectivity.hpp>

Inheritance diagram for Selectivity:
AStringable ICloneable

Public Member Functions

 Selectivity (int ncut=0)
 
 Selectivity (const VectorDouble &zcuts, double zmax=TEST, double proba=TEST, bool flag_tonnage_correct=false)
 
 Selectivity (const Selectivity &m)
 
Selectivityoperator= (const Selectivity &m)
 
virtual ~Selectivity ()
 
virtual String toString (const AStringFormat *strfmt=nullptr) const override
 ICloneable interface. More...
 
int calculateFromDb (const Db *db, bool autoCuts=false)
 
int calculateFromArray (const VectorDouble &tab, const VectorDouble &weights=VectorDouble(), bool autoCuts=false)
 
int calculateFromAnamorphosis (AAnam *anam)
 
const Table eval (const Db *db, bool autoCuts=false)
 
const Table evalFromArray (const VectorDouble &tab, const VectorDouble &weights=VectorDouble(), bool autoCuts=false)
 
const Table evalFromAnamorphosis (AAnam *anam)
 
void resetCuts (const VectorDouble &zcuts)
 
int getNCuts () const
 
int getNQT () const
 
int getVariableNumber () const
 
String getVariableName (const ESelectivity &code, int icut, int mode) const
 
String getVariableName (int rank0) const
 
VectorString getVariableNames () const
 
void setZcut (int icut, double zcut)
 
void setBest (int icut, double best)
 
void setMest (int icut, double mest)
 
void setQest (int icut, double qest)
 
void setQstd (int icut, double qstd)
 
void setTest (int icut, double test)
 
void setTstd (int icut, double tstd)
 
double getZcut (int icut) const
 
double getBest (int icut) const
 
double getMest (int icut) const
 
double getQest (int icut) const
 
double getQstd (int icut) const
 
double getTest (int icut) const
 
double getTstd (int icut) const
 
const VectorDoublegetZcut () const
 
void calculateBenefitAndGrade ()
 
void dumpGini ()
 
void correctTonnageOrder ()
 
void defineRecoveries (const std::vector< ESelectivity > &codes, bool flag_est, bool flag_std, double proba=TEST, bool verbose=false)
 
bool isUsed (const ESelectivity &code) const
 
bool isUsedEst (const ESelectivity &code) const
 
bool isUsedStD (const ESelectivity &code) const
 
bool isNeededT () const
 
bool isNeededQ () const
 
int getAddressQTEst (const ESelectivity &code, int iptr0, int rank=0) const
 
int getAddressQTStd (const ESelectivity &code, int iptr0, int rank=0) const
 
int getNumberQTEst (const ESelectivity &code) const
 
int getNumberQTStd (const ESelectivity &code) const
 
const VectorInt getNumberQTEst () const
 
const VectorInt getNumberQTStd () const
 
void storeInDb (Db *db, int iech0, int iptr, double zestim, double zstdev)
 
void interpolateSelectivity (const Selectivity *selecin)
 
void setFlagTonnageCorrect (bool flagTonnageCorrect)
 
void setZmax (double zmax)
 
bool isFlagTonnageCorrect () const
 
double getZmax () const
 
bool isOnlyZDefined () const
 
const Table getStats () const
 
const Table getAllStats () const
 
const MatrixIntgetNumberQt () const
 
const MatrixIntgetRankQt () 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
 

Static Public Member Functions

static Selectivitycreate (int ncut)
 
static SelectivitycreateByCuts (const VectorDouble &zcut)
 
static SelectivitycreateByCodes (const std::vector< ESelectivity > &codes, const VectorDouble &zcuts=VectorDouble(), bool flag_est=true, bool flag_std=true, double proba=TEST, bool verbose=false)
 
static SelectivitycreateByKeys (const VectorString &keys, const VectorDouble &zcuts=VectorDouble(), bool flag_est=true, bool flag_std=true, double zmax=TEST, bool flag_correct=false, double proba=TEST, bool verbose=false)
 
static SelectivitycreateInterpolation (const VectorDouble &zcuts, const Selectivity &selecin, bool verbose)
 

Constructor & Destructor Documentation

Selectivity::Selectivity ( int  ncut = 0)
Selectivity::Selectivity ( const VectorDouble zcuts,
double  zmax = TEST,
double  proba = TEST,
bool  flag_tonnage_correct = false 
)
Selectivity::Selectivity ( const Selectivity m)
Selectivity::~Selectivity ( )
virtual

Member Function Documentation

void Selectivity::calculateBenefitAndGrade ( )

From the cutoff, tonnage and metal quantity, derive the conventional benefit and the average recovered grade

int Selectivity::calculateFromAnamorphosis ( AAnam anam)
int Selectivity::calculateFromArray ( const VectorDouble tab,
const VectorDouble weights = VectorDouble(),
bool  autoCuts = false 
)
int Selectivity::calculateFromDb ( const Db db,
bool  autoCuts = false 
)
void Selectivity::correctTonnageOrder ( )

Correct the order relationship for Tonnage

Selectivity * Selectivity::create ( int  ncut)
static
Selectivity * Selectivity::createByCodes ( const std::vector< ESelectivity > &  codes,
const VectorDouble zcuts = VectorDouble(),
bool  flag_est = true,
bool  flag_std = true,
double  proba = TEST,
bool  verbose = false 
)
static
Selectivity * Selectivity::createByCuts ( const VectorDouble zcut)
static
Selectivity * Selectivity::createByKeys ( const VectorString keys,
const VectorDouble zcuts = VectorDouble(),
bool  flag_est = true,
bool  flag_std = true,
double  zmax = TEST,
bool  flag_correct = false,
double  proba = TEST,
bool  verbose = false 
)
static
Selectivity * Selectivity::createInterpolation ( const VectorDouble zcuts,
const Selectivity selecin,
bool  verbose 
)
static

Interpolate the Grade-Tonnage curves

Parameters
[in]zcutsArray of cutoffs
[in]selecinInput Selectivity
[in]verboseVerbose flag
void Selectivity::defineRecoveries ( const std::vector< ESelectivity > &  codes,
bool  flag_est,
bool  flag_std,
double  proba = TEST,
bool  verbose = false 
)

Analyze the contents of the codes

Parameters
[in]codesArray of selectivity codes
[in]flag_estTrue for estimation
[in]flag_stdTrue for st. dev.
[in]probaProbability value (or TEST)
[in]verboseVerbose flag
void Selectivity::dumpGini ( )

Calculate and print the Gini index

const Table Selectivity::eval ( const Db db,
bool  autoCuts = false 
)
const Table Selectivity::evalFromAnamorphosis ( AAnam anam)
const Table Selectivity::evalFromArray ( const VectorDouble tab,
const VectorDouble weights = VectorDouble(),
bool  autoCuts = false 
)
int Selectivity::getAddressQTEst ( const ESelectivity &  code,
int  iptr0,
int  rank = 0 
) const
int Selectivity::getAddressQTStd ( const ESelectivity &  code,
int  iptr0,
int  rank = 0 
) const
const Table Selectivity::getAllStats ( ) const
inline
double Selectivity::getBest ( int  icut) const
double Selectivity::getMest ( int  icut) const
int Selectivity::getNCuts ( ) const
inline
int Selectivity::getNQT ( ) const
inline
const MatrixInt& Selectivity::getNumberQt ( ) const
inline
int Selectivity::getNumberQTEst ( const ESelectivity &  code) const
const VectorInt Selectivity::getNumberQTEst ( ) const
int Selectivity::getNumberQTStd ( const ESelectivity &  code) const
const VectorInt Selectivity::getNumberQTStd ( ) const
double Selectivity::getQest ( int  icut) const
double Selectivity::getQstd ( int  icut) const
const MatrixInt& Selectivity::getRankQt ( ) const
inline
const Table Selectivity::getStats ( ) const
double Selectivity::getTest ( int  icut) const
double Selectivity::getTstd ( int  icut) const
String Selectivity::getVariableName ( const ESelectivity &  code,
int  icut,
int  mode 
) const
String Selectivity::getVariableName ( int  rank0) const
VectorString Selectivity::getVariableNames ( ) const
int Selectivity::getVariableNumber ( ) const
double Selectivity::getZcut ( int  icut) const
const VectorDouble& Selectivity::getZcut ( ) const
inline
double Selectivity::getZmax ( ) const
inline
void Selectivity::interpolateSelectivity ( const Selectivity selecin)

Interpolate the QT curves (Local estimation)

Parameters
[in]selecinSelectivity
bool Selectivity::isFlagTonnageCorrect ( ) const
inline
bool Selectivity::isNeededQ ( ) const
bool Selectivity::isNeededT ( ) const
bool Selectivity::isOnlyZDefined ( ) const
inline
bool Selectivity::isUsed ( const ESelectivity &  code) const
bool Selectivity::isUsedEst ( const ESelectivity &  code) const
bool Selectivity::isUsedStD ( const ESelectivity &  code) const
Selectivity & Selectivity::operator= ( const Selectivity m)
void Selectivity::resetCuts ( const VectorDouble zcuts)
void Selectivity::setBest ( int  icut,
double  best 
)
void Selectivity::setFlagTonnageCorrect ( bool  flagTonnageCorrect)
inline
void Selectivity::setMest ( int  icut,
double  mest 
)
void Selectivity::setQest ( int  icut,
double  qest 
)
void Selectivity::setQstd ( int  icut,
double  qstd 
)
void Selectivity::setTest ( int  icut,
double  test 
)
void Selectivity::setTstd ( int  icut,
double  tstd 
)
void Selectivity::setZcut ( int  icut,
double  zcut 
)
void Selectivity::setZmax ( double  zmax)
inline
void Selectivity::storeInDb ( Db db,
int  iech0,
int  iptr,
double  zestim,
double  zstdev 
)

Store the local results of the recovery

Parameters
[in]dbDb structure containing the factors (Z-locators)
[in]iech0Rank of the target sample
[in]iptrRank for storing the results
[in]zestimEstimated grade
[in]zstdevSt. dev.
String Selectivity::toString ( const AStringFormat strfmt = nullptr) const
overridevirtual

ICloneable interface.

AStringable Interface

Reimplemented from AStringable.


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