00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef SIGNEDRANGEGENOTYPE_H
00021 #define SIGNEDRANGEGENOTYPE_H
00022
00023 #include "gaconfig.h"
00024 #include "genotypes/doublegenotype.h"
00025
00026 namespace farsa {
00027
00039 class FARSA_GA_API SignedRangeGenotype : public DoubleGenotype {
00040 public:
00050 SignedRangeGenotype( unsigned int numGenes = 0, double max = +1, unsigned int bitPrecision = 8 );
00052 virtual ~SignedRangeGenotype();
00054 SignedRangeGenotype( const SignedRangeGenotype& genotype );
00056 virtual SignedRangeGenotype& operator=( const Genotype& genotype );
00058 virtual double at( unsigned int i );
00060 virtual void set( unsigned int i, double value );
00067 virtual void configure( ConfigurationParameters& params, QString prefix );
00074 virtual void save( ConfigurationParameters& params, QString prefix );
00076 static void describe( QString type );
00078 virtual SignedRangeGenotype* clone() const;
00079 private:
00081 double dx;
00082 };
00083
00084 }
00085
00086 #endif