00001
00009
00010
00011
00012
00013
00014 #ifndef __GAL_INTCHROMOSOME_H
00015 #define __GAL_INTCHROMOSOME_H
00016
00017 #include <string>
00018 #include <sstream>
00019 #include "Chromosome.h"
00020 #include "Util.h"
00021
00022 namespace gal {
00028 class IntChromosome : public Chromosome<int> {
00029 public:
00030
00036 IntChromosome(int length) : Chromosome<int>(length)
00037 {
00038 if (length > (sizeof(int)*8 - 1)) {
00039 std::cerr << "Warning: IntChromosome: bitstring length "
00040 << length << " exceeds size of standard int type." << std::endl;
00041 }
00042 }
00043
00047 int const getValue()
00048 {
00049
00050
00051 return 0;
00052
00053
00054
00055 }
00056
00060 std::string const getValueText()
00061 {
00062
00063
00064
00065 return "empty";
00066
00067
00068
00069 }
00070 };
00071 }
00072 #endif