Brief description of class still missing. More...
#include <ActiveModel.h>
Public Member Functions | |
| int | acceptedCount () const |
| void | addAccepted () |
| void | addRejected () |
| bool | giveUp (double ratio) const |
| void | healthCheck () |
| bool | isAlive () const |
| bool | isDying () const |
| bool | isQuarantined () const |
| int | modelIndex () const |
| int | navigatorHit () const |
| void | operator= (int modelIndex) |
| void | operator= (const ActiveModel &o) |
| int | rejectedCount () const |
| void | setNavigatorHit (int n=0) |
| void | setQuarantined () |
Brief description of class still missing.
Information about models.
| int DinverCore::ActiveModel::acceptedCount | ( | ) | const [inline] |
{return _nAccepted;}
| void DinverCore::ActiveModel::addAccepted | ( | ) | [inline] |
Referenced by DinverCore::GeneratorModels::commitStatistics().
{_nAccepted++;}
| void DinverCore::ActiveModel::addRejected | ( | ) | [inline] |
Referenced by DinverCore::GeneratorModels::commitStatistics().
{_nRejected++;}
| bool DinverCore::ActiveModel::giveUp | ( | double | ratio | ) | const [inline] |
Referenced by DinverCore::GeneratorModels::commitStatistics().
{
return _nRejected>50 &&
_nRejected>ratio*(double)(_nRejected+_nAccepted);
}
| void DinverCore::ActiveModel::healthCheck | ( | ) | [inline] |
Referenced by DinverCore::GeneratorModels::removeDeadModels().
{
// Negative navigator hit count are always considered as alive.
/*if(_nNavigatorHits>0) {
_nNavigatorHits=0;
_lives++;
} else if(_nNavigatorHits==0) {
if(isAlive()) _lives--;
}*/
}
| bool DinverCore::ActiveModel::isAlive | ( | ) | const [inline] |
{return _lives>0;}
| bool DinverCore::ActiveModel::isDying | ( | ) | const [inline] |
Referenced by DinverCore::GeneratorModels::removeDeadModels().
{return /*_nNavigatorHits==0 && */ _lives==1;}
| bool DinverCore::ActiveModel::isQuarantined | ( | ) | const [inline] |
Referenced by DinverCore::GeneratorModels::removeDeadModels(), and DinverCore::BestModels::update().
{return _quarantined;}
| int DinverCore::ActiveModel::modelIndex | ( | ) | const [inline] |
Referenced by operator=().
{return _modelIndex;}
| int DinverCore::ActiveModel::navigatorHit | ( | ) | const [inline] |
Referenced by DinverCore::ModelRepository::printActiveModels().
{return _navigatorHit;}
| void DinverCore::ActiveModel::operator= | ( | int | modelIndex | ) | [inline] |
References modelIndex().
{
_modelIndex=modelIndex;
_nAccepted=0;
_nRejected=0;
//_nNavigatorHits=0;
_navigatorHit=0;
_lives=40;
_quarantined=false;
}
| void DinverCore::ActiveModel::operator= | ( | const ActiveModel & | o | ) | [inline] |
{
_modelIndex=o._modelIndex;
_nAccepted=o._nAccepted;
_nRejected=o._nRejected;
_quarantined=o._quarantined;
//_nNavigatorHits=o._nNavigatorHits;
_navigatorHit=o._navigatorHit;
_lives=o._lives;
}
| int DinverCore::ActiveModel::rejectedCount | ( | ) | const [inline] |
{return _nRejected;}
| void DinverCore::ActiveModel::setNavigatorHit | ( | int | n = 0 | ) | [inline] |
Referenced by DinverCore::ActiveModels::setNavigatorHits().
{_navigatorHit=n;}
| void DinverCore::ActiveModel::setQuarantined | ( | ) | [inline] |
Referenced by DinverCore::GeneratorModels::commitStatistics().
{_quarantined=true;}