00001 00009 #ifndef __POPULATION_H__ 00010 #define __POPULATION_H__ 00011 00012 #include <Configuration.h> 00013 #include <Individual.h> 00014 #include <MultiobjectiveProblem.h> 00015 00023 class Population { 00024 protected: 00025 int populationSize_ ; 00026 int maximumPopulationSize_ ; 00027 Individual ** population_ ; 00028 Random * random_ ; 00029 00030 MultiobjectiveProblem * problem_ ; 00031 00032 public: 00033 // Constructor 00034 Population(int populationSize , 00035 int maximumPopulationSize, 00036 Random * random , 00037 MultiobjectiveProblem * problem); 00038 00039 // Destructor 00040 ~Population(void); 00041 00042 // Methods 00043 int getPopulationSize() const ; 00044 int getMaximumPopulationSize() const ; 00045 Individual * getIth(int index) const ; 00046 void setIth(int index, Individual * ind) ; 00047 void deleteIth(int index) ; 00048 void addIndividual(Individual * individual) ; 00049 void setFitness(int index, double * fitness) ; 00050 00051 void printFitness(char * fileName) ; 00052 void printGenotype(char * fileName) ; 00053 } ; // Population 00054 00055 #endif