#ifndef GENERATOR #define GENERATOR #include "Genetic.h" #include "Graf.h" #include using namespace std; /** * Generator.h * * Implementation of the random chromosomes generator. */ class Generator { public: /** * the number of chromosome we need to generate */ int no_chromosomes; /** * the tasks graph */ TaskGraf tasks; /** * the number of processors we can use */ int no_procs; /** * the number of chromosomes currently returned */ int returned; /** * the list of chromosomes currently generated */ Chromosome * ch_list; /** * the list of floating nodes */ vector f_nodes; public: /** * The constructor * * @param no_ch the number of chromosomes * @param t the graph of tasks * @param nr_procs the number of processors */ Generator(int no_ch = 0 , TaskGraf t = NULL, int nr_procs = 0); /** * Method returning the next chromosome from the list * * @return the next chromosome */ Chromosome getNext(); /** * Method generating the chromosomes list * * @return void */ void generate(); /** * Setter for the list of floating nodes * * @param the list of floating nodes */ void setFloatingNodes(vector &float_n); }; #endif