1.3.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() [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_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 ( )

Calculate and print the Gini index

◆ eval()

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

◆ evalFromAnamorphosis()

const Table Selectivity::evalFromAnamorphosis ( AAnam anam)

◆ evalFromArray()

const 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()

const Table Selectivity::getAllStats ( ) const
inline

◆ getBest()

double Selectivity::getBest ( int  icut) const

◆ getMest()

double Selectivity::getMest ( int  icut) const

◆ getNCuts()

int Selectivity::getNCuts ( ) const
inline

◆ getNQT()

int Selectivity::getNQT ( ) const
inline

◆ getNumberQt()

const MatrixInt& Selectivity::getNumberQt ( ) const
inline

◆ getNumberQTEst() [1/2]

const VectorInt Selectivity::getNumberQTEst ( ) const

◆ getNumberQTEst() [2/2]

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

◆ getNumberQTStd() [1/2]

const VectorInt Selectivity::getNumberQTStd ( ) const

◆ getNumberQTStd() [2/2]

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

◆ getQest()

double Selectivity::getQest ( int  icut) const

◆ getQstd()

double Selectivity::getQstd ( int  icut) const

◆ getRankQt()

const MatrixInt& Selectivity::getRankQt ( ) const
inline

◆ getStats()

const Table Selectivity::getStats ( ) const

◆ getTest()

double Selectivity::getTest ( int  icut) const

◆ getTstd()

double Selectivity::getTstd ( int  icut) 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  icut) 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  icut,
double  best 
)

◆ setFlagTonnageCorrect()

void Selectivity::setFlagTonnageCorrect ( bool  flagTonnageCorrect)
inline

◆ setMest()

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

◆ setQest()

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

◆ setQstd()

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

◆ setTest()

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

◆ setTstd()

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

◆ setZcut()

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

◆ setZmax()

void Selectivity::setZmax ( double  zmax)
inline

◆ storeInDb()

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.

◆ 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: