Population.h

Go to the documentation of this file.
00001 
00006 #ifndef GENETIK_POPULATION
00007 #define GENETIK_POPULATION
00008 
00009 /*
00010         This class rapresents the population, as a collection of individual.
00011 */
00012 
00013 namespace genetiK{
00014 
00015 class Individual;
00016 
00024 class Population
00025 {
00026 
00027 private:
00028         unsigned int                                                                    size;
00029         Individual**                                                                    individuals; /* array of Individual*/
00030 
00031 public:
00034         Population(unsigned int size);
00035 
00039         virtual ~Population(void);
00040 
00044         unsigned int                                                                    getSize() const { return size; }
00045 
00050         Individual**                                                                    getIndividuals(){ return individuals; }
00051 
00056         Individual*                                                                     getBest();
00057 
00064         void                                                                            sort(bool ascending=true);
00065 
00066 };
00067 
00068 }
00069 
00070 #endif

Generated on Thu Feb 23 12:20:45 2006 for GenetiK by  doxygen 1.4.6