#include <Selectivity.hpp>
Public Member Functions | |
| Selectivity (Id ncut=0) | |
| Selectivity (const 1 &zcuts, double zmax=TEST, double proba=TEST, bool flag_tonnage_correct=false) | |
| Selectivity (const Selectivity &m) | |
| Selectivity & | operator= (const Selectivity &m) |
| virtual | ~Selectivity () |
| String | toString (const AStringFormat *strfmt=nullptr) const override |
| ICloneable interface. | |
| Id | calculateFromDb (const Db *db, bool autoCuts=false) |
| Id | calculateFromArray (const 1 &tab, const 1 &weights=1(), bool autoCuts=false) |
| Id | calculateFromAnamorphosis (AAnam *anam) |
| Table | eval (const Db *db, bool autoCuts=false) |
| Table | evalFromArray (const 1 &tab, const 1 &weights=1(), bool autoCuts=false) |
| Table | evalFromAnamorphosis (AAnam *anam) |
| void | resetCuts (const 1 &zcuts) |
| Id | getNCuts () const |
| Id | getNVar () const |
| String | getVariableName (const ESelectivity &code, Id icut, Id mode) const |
| String | getVariableName (Id rank0) const |
| VectorString | getVariableNames () const |
| void | setZcut (Id iclass, double zcut) |
| void | setBest (Id iclass, double best) |
| void | setMest (Id iclass, double mest) |
| void | setQest (Id iclass, double qest) |
| void | setQstd (Id iclass, double qstd) |
| void | setTest (Id iclass, double test) |
| void | setTstd (Id iclass, double tstd) |
| double | getZcut (Id iclass) const |
| double | getBest (Id iclass) const |
| double | getMest (Id iclass) const |
| double | getQest (Id iclass) const |
| double | getQstd (Id iclass) const |
| double | getTest (Id iclass) const |
| double | getTstd (Id iclass) const |
| const & | 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 |
| Id | getAddressQTEst (const ESelectivity &code, Id iptr0, Id rank=0) const |
| Id | getAddressQTStd (const ESelectivity &code, Id iptr0, Id rank=0) const |
| Id | getNQTEst (const ESelectivity &code) const |
| Id | getNQTStd (const ESelectivity &code) const |
| getNQTEst () const | |
| geNQTStd () const | |
| void | storeInDb (Db *db, Id iech0, Id 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 & | getCountQT () const |
| const MatrixInt & | getRankQt () const |
Public Member Functions inherited from gstlrn::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 (Id level) const final |
Public Member Functions inherited from gstlrn::ICloneable | |
| ICloneable () | |
| virtual | ~ICloneable () |
| virtual ICloneable * | clone () const =0 |
| std::shared_ptr< ICloneable > | cloneShared () const |
| std::unique_ptr< ICloneable > | cloneUnique () const |
Static Public Member Functions | |
| static Selectivity * | create (Id ncut) |
| static Selectivity * | createByCuts (const 1 &zcut) |
| static Selectivity * | createByCodes (const std::vector< ESelectivity > &codes, const 1 &zcuts=1(), bool flag_est=true, bool flag_std=true, double proba=TEST, bool verbose=false) |
| static Selectivity * | createByKeys (const VectorString &keys, const 1 &zcuts=1(), 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 1 &zcuts, const Selectivity &selecin, bool verbose) |
| static Id | getNQT () |
| gstlrn::Selectivity::Selectivity | ( | Id | ncut = 0 | ) |
| gstlrn::Selectivity::Selectivity | ( | const 1 & | zcuts, |
| double | zmax = TEST, |
||
| double | proba = TEST, |
||
| bool | flag_tonnage_correct = false |
||
| ) |
| gstlrn::Selectivity::Selectivity | ( | const Selectivity & | m | ) |
|
virtual |
| void gstlrn::Selectivity::calculateBenefitAndGrade | ( | ) |
From the cutoff, tonnage and metal quantity, derive the conventional benefit and the average recovered grade
| Id gstlrn::Selectivity::calculateFromArray | ( | const 1 & | tab, |
| const 1 & | weights = 1(), |
||
| bool | autoCuts = false |
||
| ) |
| void gstlrn::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 gstlrn::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 gstlrn::Selectivity::dumpGini | ( | ) | const |
Calculate and print the Gini index
| Table gstlrn::Selectivity::evalFromArray | ( | const 1 & | tab, |
| const 1 & | weights = 1(), |
||
| bool | autoCuts = false |
||
| ) |
| gstlrn::Selectivity::geNQTStd | ( | ) | const |
|
inline |
| double gstlrn::Selectivity::getBest | ( | Id | iclass | ) | const |
|
inline |
| double gstlrn::Selectivity::getMest | ( | Id | iclass | ) | const |
|
inline |
|
inlinestatic |
| gstlrn::Selectivity::getNQTEst | ( | ) | const |
| Id gstlrn::Selectivity::getNQTEst | ( | const ESelectivity & | code | ) | const |
| Id gstlrn::Selectivity::getNQTStd | ( | const ESelectivity & | code | ) | const |
| Id gstlrn::Selectivity::getNVar | ( | ) | const |
| double gstlrn::Selectivity::getQest | ( | Id | iclass | ) | const |
| double gstlrn::Selectivity::getQstd | ( | Id | iclass | ) | const |
|
inline |
| Table gstlrn::Selectivity::getStats | ( | ) | const |
| double gstlrn::Selectivity::getTest | ( | Id | iclass | ) | const |
| double gstlrn::Selectivity::getTstd | ( | Id | iclass | ) | const |
| VectorString gstlrn::Selectivity::getVariableNames | ( | ) | const |
|
inline |
| double gstlrn::Selectivity::getZcut | ( | Id | iclass | ) | const |
|
inline |
| void gstlrn::Selectivity::interpolateSelectivity | ( | const Selectivity * | selecin | ) |
Interpolate the QT curves (Local estimation)
| [in] | selecin | Selectivity |
|
inline |
| bool gstlrn::Selectivity::isNeededQ | ( | ) | const |
| bool gstlrn::Selectivity::isNeededT | ( | ) | const |
|
inline |
| bool gstlrn::Selectivity::isUsed | ( | const ESelectivity & | code | ) | const |
| bool gstlrn::Selectivity::isUsedEst | ( | const ESelectivity & | code | ) | const |
| bool gstlrn::Selectivity::isUsedStD | ( | const ESelectivity & | code | ) | const |
| Selectivity & gstlrn::Selectivity::operator= | ( | const Selectivity & | m | ) |
| void gstlrn::Selectivity::resetCuts | ( | const 1 & | zcuts | ) |
| void gstlrn::Selectivity::setBest | ( | Id | iclass, |
| double | best | ||
| ) |
|
inline |
| void gstlrn::Selectivity::setMest | ( | Id | iclass, |
| double | mest | ||
| ) |
| void gstlrn::Selectivity::setQest | ( | Id | iclass, |
| double | qest | ||
| ) |
| void gstlrn::Selectivity::setQstd | ( | Id | iclass, |
| double | qstd | ||
| ) |
| void gstlrn::Selectivity::setTest | ( | Id | iclass, |
| double | test | ||
| ) |
| void gstlrn::Selectivity::setTstd | ( | Id | iclass, |
| double | tstd | ||
| ) |
| void gstlrn::Selectivity::setZcut | ( | Id | iclass, |
| double | zcut | ||
| ) |
|
inline |
| void gstlrn::Selectivity::storeInDb | ( | Db * | db, |
| Id | iech0, | ||
| Id | 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 |