FT::ExponentialCheater< Engine > Class Template Reference
#include <Cheaters.h>
List of all members.
Public Member Functions |
| | ExponentialCheater (const double &lambda=1.0, const size_t nb_generations=200, const task_level_t tl=NO_TASK_LEVEL, const task_type_t tt=ALL_TASKS, const cheat_mode_t cm=CHEAT_OVER_GENERATIONS) |
| | ExponentialCheater (const uint32_t seed, const double &lambda=1.0, const size_t nb_generations=200, const task_level_t tl=NO_TASK_LEVEL, const task_type_t tt=ALL_TASKS, const cheat_mode_t cm=CHEAT_OVER_GENERATIONS) |
| virtual | ~ExponentialCheater () |
| double | lambda () const |
| bool | cheat (const size_t age=0, const task_type_t tt=ALL_TASKS) |
| bool | cheatAtLevel (const task_level_t tl=NO_TASK_LEVEL, const size_t age=0, const task_type_t tt=ALL_TASKS) |
Protected Attributes |
| boost::exponential_distribution | _dist |
boost::variate_generator
< Engine
&, boost::exponential_distribution<> > | _generator |
Friends |
| template<class T > |
| std::ostream & | operator<< (std::ostream &os, const ExponentialCheater< T > &f) |
Detailed Description
template<class Engine = boost::mt19937>
class FT::ExponentialCheater< Engine >
ExponentialCheater : a cheater that cheat using an exponential distribution based either on the age of the current generation or the position in the sequential order depending on the cheat_mode.
Reminder: cheat are distributed with probability density function p(x) = lambda * exp(-lambda * x), where lambda is the parameter of the constructor.
Constructor & Destructor Documentation
template<class Engine = boost::mt19937>
template<class Engine = boost::mt19937>
template<class Engine = boost::mt19937>
Member Function Documentation
template<class Engine = boost::mt19937>
decide is a cheat should be performed
- Parameters:
-
| age | age of the current generation |
| tt | type of the current task that call cheat |
- Returns:
- true if a cheat should be done
Implements FT::Cheater< Engine >.
template<class Engine = boost::mt19937>
decide is a cheat should be performed
- Parameters:
-
| tl | task level of the current task |
| age | age of the current generation |
| tt | type of the current task that call cheat |
- Returns:
- true if a cheat should be done
Implements FT::Cheater< Engine >.
template<class Engine = boost::mt19937>
Friends And Related Function Documentation
template<class Engine = boost::mt19937>
template<class T >
| std::ostream& operator<< |
( |
std::ostream & |
os, |
|
|
const ExponentialCheater< T > & |
f | |
|
) |
| | [friend] |
Member Data Documentation
template<class Engine = boost::mt19937>
template<class Engine = boost::mt19937>
The documentation for this class was generated from the following file: