FT::Cheater< Engine > Class Template Reference
This class modelize a generic cheater and is used as a base class for specialized cheaters. A cheat interviene at different granularity of tasks.
More...
#include <Cheaters.h>
List of all members.
Public Member Functions |
| | Cheater (const edistribution_t d=UNDEFINED, 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_UNIFORM) |
| | Cheater (const uint32_t seed, const edistribution_t d=UNDEFINED, 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_UNIFORM) |
| virtual | ~Cheater () |
| Engine | getEngine () const |
| edistribution_t | getDistType () const |
| size_t | getNbGenerations () const |
| task_level_t | getTaskLevelToCheat () const |
| task_type_t | getTaskTypeToCheat () const |
| cheat_mode_t | getCheatMode () const |
| size_t | getNbCheated () const |
| size_t | getNbLevelTasks () const |
| double | getCheatedTasksRatio () const |
| void | setDistType (const edistribution_t &dist_type) |
| void | seed (const uint32_t value=42u) |
| void | setNbGenerations (const size_t &nb_generations) |
| void | setCheatMode (const cheat_mode_t &cheat_mode) |
| void | setTaskTypeToCheat (const task_type_t &task_type_to_cheat) |
| virtual bool | cheat (const size_t age=0, const task_type_t tt=ALL_TASKS)=0 |
| virtual bool | cheatAtLevel (const task_level_t tl=NO_TASK_LEVEL, const size_t age=0, const task_type_t tt=ALL_TASKS)=0 |
Protected Attributes |
| Engine | _prng |
| edistribution_t | _dist_type |
| size_t | _nb_generations |
| task_level_t | _task_level_to_cheat |
| task_type_t | _task_type_to_cheat |
| cheat_mode_t | _cheat_mode |
| size_t | _nb_cheated |
| size_t | _nb_tasks |
Friends |
| template<class T > |
| std::ostream & | operator<< (std::ostream &os, const Cheater< T > &c) |
Detailed Description
template<class Engine = boost::mt19937>
class FT::Cheater< Engine >
This class modelize a generic cheater and is used as a base class for specialized cheaters. A cheat interviene at different granularity of tasks.
Constructor & Destructor Documentation
template<class Engine = boost::mt19937>
Default constructor that initialize the cheater. The random generator is seeded with the current time.
- Parameters:
-
| d | kind of distribution |
| nb_generations | maximum number of generations to be run on which cheat can happen |
| tl | granularity of the tasks to affect |
| tt | type of task to cheat |
| cm | cheat mode (useful for distribution that are not uniform) |
template<class Engine = boost::mt19937>
Another constructor that initialize the cheater where the seed for the random generator is given
- Parameters:
-
| seed | |
| d | kind of distribution |
| nb_generations | maximum number of generations to be run on which cheat can happen |
| tl | granularity of the tasks to affect |
| tt | type of task to cheat |
| cm | cheat mode (useful for distribution that are not uniform) |
template<class Engine = boost::mt19937>
Member Function Documentation
template<class Engine = boost::mt19937>
| virtual bool FT::Cheater< Engine >::cheat |
( |
const size_t |
age = 0, |
|
|
const task_type_t |
tt = ALL_TASKS | |
|
) |
| | [pure virtual] |
template<class Engine = boost::mt19937>
template<class Engine = boost::mt19937>
| double FT::Cheater< Engine >::getCheatedTasksRatio |
( |
|
) |
const [inline] |
template<class Engine = boost::mt19937>
template<class Engine = boost::mt19937>
template<class Engine = boost::mt19937>
| Engine FT::Cheater< Engine >::getEngine |
( |
|
) |
const [inline] |
template<class Engine = boost::mt19937>
| size_t FT::Cheater< Engine >::getNbCheated |
( |
|
) |
const [inline] |
template<class Engine = boost::mt19937>
| size_t FT::Cheater< Engine >::getNbGenerations |
( |
|
) |
const [inline] |
template<class Engine = boost::mt19937>
| size_t FT::Cheater< Engine >::getNbLevelTasks |
( |
|
) |
const [inline] |
template<class Engine = boost::mt19937>
template<class Engine = boost::mt19937>
template<class Engine = boost::mt19937>
| void FT::Cheater< Engine >::seed |
( |
const uint32_t |
value = 42u |
) |
[inline] |
template<class Engine = boost::mt19937>
template<class Engine = boost::mt19937>
template<class Engine = boost::mt19937>
| void FT::Cheater< Engine >::setNbGenerations |
( |
const size_t & |
nb_generations |
) |
[inline] |
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 Cheater< T > & |
c | |
|
) |
| | [friend] |
Member Data Documentation
template<class Engine = boost::mt19937>
template<class Engine = boost::mt19937>
template<class Engine = boost::mt19937>
template<class Engine = boost::mt19937>
maximum number of generations to be run
template<class Engine = boost::mt19937>
total number of tasks considered at the level mentioned in _task_level_to_cheat
template<class Engine = boost::mt19937>
random number generators (boost::mt19937 by default)
template<class Engine = boost::mt19937>
task level where the cheat should interviene
template<class Engine = boost::mt19937>
The documentation for this class was generated from the following file: