#include <Selectivity.hpp>
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) | |
Selectivity & | operator= (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 VectorDouble & | getZcut () 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 MatrixInt & | getNumberQt () const |
const MatrixInt & | getRankQt () const |
Public Member Functions inherited from AStringable | |
AStringable () | |
AStringable (const AStringable &r) | |
AStringable & | operator= (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 ICloneable * | clone () const =0 |
Static Public Member Functions | |
static Selectivity * | create (int ncut) |
static Selectivity * | createByCuts (const VectorDouble &zcut) |
static 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 * | 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 Selectivity * | createInterpolation (const VectorDouble &zcuts, const Selectivity &selecin, bool verbose) |
static int | getNQT () |
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 | ) |
|
virtual |
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
|
static |
|
static |
|
static |
|
static |
|
static |
Interpolate the Grade-Tonnage curves
[in] | zcuts | Array of cutoffs |
[in] | selecin | Input Selectivity |
[in] | verbose | Verbose 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
[in] | codes | Array of selectivity codes |
[in] | flag_est | True for estimation |
[in] | flag_std | True for st. dev. |
[in] | proba | Probability value (or TEST) |
[in] | verbose | Verbose flag |
void Selectivity::dumpGini | ( | ) | const |
Calculate and print the Gini index
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 |
|
inline |
double Selectivity::getBest | ( | int | iclass | ) | const |
double Selectivity::getMest | ( | int | iclass | ) | const |
|
inline |
|
inlinestatic |
|
inline |
VectorInt Selectivity::getNumberQTEst | ( | ) | const |
int Selectivity::getNumberQTEst | ( | const ESelectivity & | code | ) | const |
VectorInt Selectivity::getNumberQTStd | ( | ) | const |
int Selectivity::getNumberQTStd | ( | const ESelectivity & | code | ) | const |
double Selectivity::getQest | ( | int | iclass | ) | const |
double Selectivity::getQstd | ( | int | iclass | ) | const |
|
inline |
Table Selectivity::getStats | ( | ) | const |
double Selectivity::getTest | ( | int | iclass | ) | const |
double Selectivity::getTstd | ( | int | iclass | ) | 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 |
|
inline |
double Selectivity::getZcut | ( | int | iclass | ) | const |
|
inline |
void Selectivity::interpolateSelectivity | ( | const Selectivity * | selecin | ) |
Interpolate the QT curves (Local estimation)
[in] | selecin | Selectivity |
|
inline |
bool Selectivity::isNeededQ | ( | ) | const |
bool Selectivity::isNeededT | ( | ) | 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 | iclass, |
double | best | ||
) |
|
inline |
void Selectivity::setMest | ( | int | iclass, |
double | mest | ||
) |
void Selectivity::setQest | ( | int | iclass, |
double | qest | ||
) |
void Selectivity::setQstd | ( | int | iclass, |
double | qstd | ||
) |
void Selectivity::setTest | ( | int | iclass, |
double | test | ||
) |
void Selectivity::setTstd | ( | int | iclass, |
double | tstd | ||
) |
void Selectivity::setZcut | ( | int | iclass, |
double | zcut | ||
) |
|
inline |
void Selectivity::storeInDb | ( | Db * | db, |
int | iech0, | ||
int | iptr, | ||
double | zestim, | ||
double | zstdev | ||
) | const |
Store the local results of the recovery
[in] | db | Db structure containing the factors (Z-locators) |
[in] | iech0 | Rank of the target sample |
[in] | iptr | Rank for storing the results |
[in] | zestim | Estimated grade |
[in] | zstdev | St. dev. |
|
overridevirtual |