// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- //----------------------------------------------------------------------------- // FlowShopInit.h // (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2007 /* This library... Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr */ //----------------------------------------------------------------------------- #ifndef FLOWSHOPINIT_H_ #define FLOWSHOPINIT_H_ #include #include "FlowShop.h" /** * Functor * Initialisation of a random genotype built by the default constructor of the eoFlowShop class */ class FlowShopInit: public eoInit { public: /** * constructor * @param const unsigned _N the number of jobs to schedule */ FlowShopInit(const unsigned _N) { N = _N; } /** * randomize a genotype * @param FlowShop & _genotype a genotype that has been default-constructed */ void operator()(FlowShop & _genotype) { // scheduling vector vector scheduling(N); // initialisation of possible values vector possibles(N); for(unsigned i=0 ; i