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