Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

population.h

00001 /***************************************************************************
00002                           population.h  -  description
00003                              -------------------
00004     begin                : Sat Apr 12 2003
00005     copyright            : (C) 2003 by Onur Soysal
00006     email                : soysal@ceng.metu.edu.tr
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef POPULATION_H
00019 #define POPULATION_H
00020 #include "chromosome.h"
00021 #include <stdlib.h>
00022 #include "serializable.h"
00023 
00035 class Population :public Serializable{
00038     Chromosome *_pop;
00041     Chromosome *_tpop;
00043     Chromosome *tpop;
00044     void Init(int Psize, int Tsize, int NPARAMS, float P_MUT, int N_MUT, float M_MUT, float P_CROSS, int nlevels, int *nnodes);
00045 public:
00047     int POP_SIZE;
00049     int T_SIZE;
00051     int ELIT_SIZE;
00053     int NPARAMS;
00055     float P_MUT;
00057     int N_MUT;
00059     float M_MUT;
00061     float P_CROSS;
00062     Population(int Psize, int Tsize, int NPARAMS, float P_MUT, int N_MUT, float M_MUT, float P_CROSS, int nlevels, int *nnodes);
00063     ~Population();
00065     Chromosome *pop;
00080     Chromosome choose();
00090     void NextGeneration();
00091     void virtual Serialize(FILE *f);
00092     void virtual Deserialize(FILE *f);
00094   void fillRandom();
00096    Population(char *filename);
00100     float CalculateDiversity();
00101 
00104     int CalculateDiversityCount();
00105 
00108     int CalculateDiversityElitCount();
00109 
00113     float CalculateDiversityElit();
00114 
00118     float Distance(int i,int j);
00119 
00124     int DistanceCount(int i,int j);
00125 
00126 
00127 
00128 };
00129 
00130 #endif

Generated on Thu Feb 12 18:42:57 2004 for ParallelizedEvolutionSystem by doxygen1.2.18