1.5.1
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)
 
Table eval (const Db *db, bool autoCuts=false)
 
Table evalFromArray (const VectorDouble &tab, const VectorDouble &weights=VectorDouble(), bool autoCuts=false)
 
Table evalFromAnamorphosis (AAnam *anam)
 
void resetCuts (const VectorDouble &zcuts)
 
int getNCuts () 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 iclass, double zcut)
 
void setBest (int iclass, double best)
 
void setMest (int iclass, double mest)
 
void setQest (int iclass, double qest)
 
void setQstd (int iclass, double qstd)
 
void setTest (int iclass, double test)
 
void setTstd (int iclass, double tstd)
 
double getZcut (int iclass) const
 
double getBest (int iclass) const
 
double getMest (int iclass) const
 
double getQest (int iclass) const
 
double getQstd (int iclass) const
 
double getTest (int iclass) const
 
double getTstd (int iclass) const
 
const VectorDoublegetZcut () const
 
void calculateBenefitAndGrade ()
 
void dumpGini () const
 
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
 
VectorInt getNumberQTEst () const
 
VectorInt getNumberQTStd () const
 
void storeInDb (Db *db, int iech0, int iptr, double zestim, double zstdev) const
 
void interpolateSelectivity (const Selectivity *selecin)
 
void setFlagTonnageCorrect (bool flagTonnageCorrect)
 
void setZmax (double zmax)
 
bool isFlagTonnageCorrect () const
 
double getZmax () const
 
bool isOnlyZDefined () const
 
Table getStats () 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_tonnage_correct=false, double proba=TEST, bool verbose=false)
 
static SelectivitycreateInterpolation (const VectorDouble &zcuts, const Selectivity &selecin, bool verbose)
 
static int getNQT ()
 

Constructor & Destructor Documentation

◆ Selectivity() [1/3]

Selectivity::Selectivity ( int  ncut = 0)

◆ Selectivity() [2/3]

Selectivity::Selectivity ( const VectorDouble zcuts,
double  zmax = TEST,
double  proba = TEST,
bool  flag_tonnage_correct = false 
)

◆ Selectivity() [3/3]

Selectivity::Selectivity ( const Selectivity m)

◆ ~Selectivity()

Selectivity::~Selectivity ( )
virtual

Member Function Documentation

◆ calculateBenefitAndGrade()

void Selectivity::calculateBenefitAndGrade ( )

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

◆ calculateFromAnamorphosis()

int Selectivity::calculateFromAnamorphosis ( AAnam anam)

◆ calculateFromArray()

int Selectivity::calculateFromArray ( const VectorDouble tab,
const VectorDouble weights = VectorDouble(),
bool  autoCuts = false 
)

◆ calculateFromDb()

int Selectivity::calculateFromDb ( const Db db,
bool  autoCuts = false 
)

◆ correctTonnageOrder()

void Selectivity::correctTonnageOrder ( )

Correct the order relationship for Tonnage

◆ create()

Selectivity * Selectivity::create ( int  ncut)
static

◆ createByCodes()

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

◆ createByCuts()

Selectivity * Selectivity::createByCuts ( const VectorDouble zcut)
static

◆ createByKeys()

Selectivity * Selectivity::createByKeys ( const VectorString keys,
const VectorDouble zcuts = VectorDouble(),
bool  flag_est = true,
bool  flag_std = true,
double  zmax = TEST,
bool  flag_tonnage_correct = false,
double  proba = TEST,
bool  verbose = false 
)
static

◆ createInterpolation()

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

◆ defineRecoveries()

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

◆ dumpGini()

void Selectivity::dumpGini ( ) const

Calculate and print the Gini index

◆ eval()

Table Selectivity::eval ( const Db db,
bool  autoCuts = false 
)

◆ evalFromAnamorphosis()

Table Selectivity::evalFromAnamorphosis ( AAnam anam)

◆ evalFromArray()

Table Selectivity::evalFromArray ( const VectorDouble tab,
const VectorDouble weights = VectorDouble(),
bool  autoCuts = false 
)

◆ getAddressQTEst()

int Selectivity::getAddressQTEst ( const ESelectivity &  code,
int  iptr0,
int  rank = 0 
) const

◆ getAddressQTStd()

int Selectivity::getAddressQTStd ( const ESelectivity &  code,
int  iptr0,
int  rank = 0 
) const

◆ getAllStats()

Table Selectivity::getAllStats ( ) const
inline

◆ getBest()

double Selectivity::getBest ( int  iclass) const

◆ getMest()

double Selectivity::getMest ( int  iclass) const

◆ getNCuts()

int Selectivity::getNCuts ( ) const
inline

◆ getNQT()

static int Selectivity::getNQT ( )
inlinestatic

◆ getNumberQt()

const MatrixInt& Selectivity::getNumberQt ( ) const
inline

◆ getNumberQTEst() [1/2]

VectorInt Selectivity::getNumberQTEst ( ) const

◆ getNumberQTEst() [2/2]

int Selectivity::getNumberQTEst ( const ESelectivity &  code) const

◆ getNumberQTStd() [1/2]

VectorInt Selectivity::getNumberQTStd ( ) const

◆ getNumberQTStd() [2/2]

int Selectivity::getNumberQTStd ( const ESelectivity &  code) const

◆ getQest()

double Selectivity::getQest ( int  iclass) const

◆ getQstd()

double Selectivity::getQstd ( int  iclass) const

◆ getRankQt()

const MatrixInt& Selectivity::getRankQt ( ) const
inline

◆ getStats()

Table Selectivity::getStats ( ) const

◆ getTest()

double Selectivity::getTest ( int  iclass) const

◆ getTstd()

double Selectivity::getTstd ( int  iclass) const

◆ getVariableName() [1/2]

String Selectivity::getVariableName ( const ESelectivity &  code,
int  icut,
int  mode 
) const

◆ getVariableName() [2/2]

String Selectivity::getVariableName ( int  rank0) const

◆ getVariableNames()

VectorString Selectivity::getVariableNames ( ) const

◆ getVariableNumber()

int Selectivity::getVariableNumber ( ) const

◆ getZcut() [1/2]

const VectorDouble& Selectivity::getZcut ( ) const
inline

◆ getZcut() [2/2]

double Selectivity::getZcut ( int  iclass) const

◆ getZmax()

double Selectivity::getZmax ( ) const
inline

◆ interpolateSelectivity()

void Selectivity::interpolateSelectivity ( const Selectivity selecin)

Interpolate the QT curves (Local estimation)

Parameters
[in]selecinSelectivity

◆ isFlagTonnageCorrect()

bool Selectivity::isFlagTonnageCorrect ( ) const
inline

◆ isNeededQ()

bool Selectivity::isNeededQ ( ) const

◆ isNeededT()

bool Selectivity::isNeededT ( ) const

◆ isOnlyZDefined()

bool Selectivity::isOnlyZDefined ( ) const
inline

◆ isUsed()

bool Selectivity::isUsed ( const ESelectivity &  code) const

◆ isUsedEst()

bool Selectivity::isUsedEst ( const ESelectivity &  code) const

◆ isUsedStD()

bool Selectivity::isUsedStD ( const ESelectivity &  code) const

◆ operator=()

Selectivity & Selectivity::operator= ( const Selectivity m)

◆ resetCuts()

void Selectivity::resetCuts ( const VectorDouble zcuts)

◆ setBest()

void Selectivity::setBest ( int  iclass,
double  best 
)

◆ setFlagTonnageCorrect()

void Selectivity::setFlagTonnageCorrect ( bool  flagTonnageCorrect)
inline

◆ setMest()

void Selectivity::setMest ( int  iclass,
double  mest 
)

◆ setQest()

void Selectivity::setQest ( int  iclass,
double  qest 
)

◆ setQstd()

void Selectivity::setQstd ( int  iclass,
double  qstd 
)

◆ setTest()

void Selectivity::setTest ( int  iclass,
double  test 
)

◆ setTstd()

void Selectivity::setTstd ( int  iclass,
double  tstd 
)

◆ setZcut()

void Selectivity::setZcut ( int  iclass,
double  zcut 
)

◆ setZmax()

void Selectivity::setZmax ( double  zmax)
inline

◆ storeInDb()

void Selectivity::storeInDb ( Db db,
int  iech0,
int  iptr,
double  zestim,
double  zstdev 
) const

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.

◆ toString()

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: