Main Page | Namespace List | Class Hierarchy | Compound List | File List | Compound Members | File Members

BinaryGrayRealGene.h

Go to the documentation of this file.
00001 #include <Configuration.h>
00002 #include <Gene.h>
00003 
00004 #ifndef __BINARY_GRAY_REAL_GENE__
00005 #define __BINARY_GRAY_REAL_GENE__
00006 
00007 class BinaryGrayRealGene : public Gene {
00008 private:
00009   void decodeGene(double lowerLimit, double upperLimit) ;
00010 public:
00011   char * binaryAllele_ ;
00012   int    numberOfBits_ ;
00013   double realAllele_   ;
00014   double lowerBound_   ;
00015   double upperBound_   ;
00016   
00017   BinaryGrayRealGene(int      numberOfBits, 
00018                      double   lowerBound, 
00019                      double   upperBound,
00020                      Random * random) ;
00021   BinaryGrayRealGene(BinaryGrayRealGene & binaryGrayRealGene) ;
00022   BinaryGrayRealGene(BinaryGrayRealGene * binaryGrayRealGene) ;
00023 
00024   int    bitFlipMutation(double mutationProbability) ;
00025   double getRealAllele() ;
00026 
00027   void   writeGenotype(ofstream &outputFile) ;
00028 
00029 
00030   BinaryGrayRealGene & operator=(const BinaryGrayRealGene& gene) ;
00031   friend ostream& operator<< (ostream& outputStream, BinaryGrayRealGene& gene) ;
00032   
00033 } ; // BinaryGrayReal
00034 
00035 #endif
00036 

Generated on Wed Feb 11 10:38:00 2004 for Paes by doxygen 1.3.3