Commit dfc22750 authored by Alexis Lebis's avatar Alexis Lebis

deprecating the old integrityCheck of CtrtsPrq

parent 3be4e3ec
......@@ -332,17 +332,7 @@ int main(int argc, char* argv[]){
resECTS = ctrECTS.integrityCheck(pop.best_element());
resRep = ctrRep.integrityCheck(pop.best_element());
resJob = ctrJob.integrityCheck(pop.best_element());
switch (ConstraintsPrerequisites::INTEGRITY_CHECK)
{
case 2:
resPrq = ctrPrq.integrityCheck2(pop.best_element());
break;
default:
resPrq = ctrPrq.integrityCheck(pop.best_element());
break;
}
std::cout << "ECTS: ";
if(resECTS.first)
......@@ -432,16 +422,7 @@ int main(int argc, char* argv[]){
resECTS = ctrECTS.integrityCheck(pop.best_element());
resRep = ctrRep.integrityCheck(pop.best_element());
resJob = ctrJob.integrityCheck(pop.best_element());
switch (ConstraintsPrerequisites::INTEGRITY_CHECK)
{
case 2:
resPrq = ctrPrq.integrityCheck2(pop.best_element());
break;
default:
resPrq = ctrPrq.integrityCheck(pop.best_element());
break;
}
std::cout << "ECTS: ";
if(resECTS.first)
......
......@@ -13,7 +13,8 @@
int ConstraintsPrerequisites::DISCRETE_METRIC = 1;
int ConstraintsPrerequisites::INTEGRITY_CHECK = 1;
std::pair<bool, double> ConstraintsPrerequisites::integrityCheck(Cursus indiv)
// @deprecated
std::pair<bool, double> ConstraintsPrerequisites::old_integrityCheck(Cursus indiv)
{
int currentTF = 0;
int notFound = 0;
......@@ -199,7 +200,7 @@ std::tuple<int, int, double, int> ConstraintsPrerequisites::_prereqsInPreviousTF
return std::tuple<int, int, double, int>(notFound, notRespected, magDiff, divisor);
}
std::pair<bool, double> ConstraintsPrerequisites::integrityCheck2(Cursus indiv)
std::pair<bool, double> ConstraintsPrerequisites::integrityCheck(Cursus indiv)
{
std::pair<bool, double> res;
......
......@@ -41,14 +41,15 @@ class ConstraintsPrerequisites
/** Integrity check is used to investigate wheteher or not one indiv respects the constraints represented by THIS.
* Returns a std::pair. First is a boolean set to true when the indiv passes the test and therefore is compilant with the constraint, false otherwise. Second is the associated metric, mostly usable during fitness calcul.
* @deprecated
* @todo Decay competency magnitude
*/
std::pair<bool, double> integrityCheck(Cursus indiv);
std::pair<bool, double> old_integrityCheck(Cursus indiv);
/**
* 2nd version of integrity check. Supposed to be more reliable and faster
*/
std::pair<bool, double> integrityCheck2(Cursus indiv);
std::pair<bool, double> integrityCheck(Cursus indiv);
};
#endif // SRC_MODEL_CONSTRAINTS_PREREQUISITES_CONSTRAINTS_H_
\ No newline at end of file
......@@ -25,16 +25,7 @@ void CursusEval::operator()(Cursus & _cursus){
resCE=ce.integrityCheck(_cursus);
resCP=cp.integrityCheck(_cursus);
resCR=cr.integrityCheck(_cursus);
switch (ConstraintsPrerequisites::INTEGRITY_CHECK)
{
case 2:
resCPR=cpr.integrityCheck2(_cursus);
break;
default:
resCPR=cpr.integrityCheck(_cursus);
break;
}
/*
std::cout << "EVAL: ";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment