Change float to double.

This commit is contained in:
kuepper 2006-12-02 11:32:00 +00:00
commit 037ce32d90
2 changed files with 7 additions and 5 deletions

View file

@ -1,5 +1,7 @@
2006-12-02 Jochen Küpper <jochen@fhi-berlin.mpg.de> 2006-12-02 Jochen Küpper <jochen@fhi-berlin.mpg.de>
* t-MGE1bit.cpp: Change float to double.
* t-eoGenOp.cpp (init): Do not add std::ends to end of string, as this * t-eoGenOp.cpp (init): Do not add std::ends to end of string, as this
results in escape-codes (^@) to be printed at runtime and is not results in escape-codes (^@) to be printed at runtime and is not
necessary anyway. necessary anyway.

View file

@ -22,7 +22,7 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
typedef eoVirus<float> Chrom; typedef eoVirus<double> Chrom;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@ -39,7 +39,7 @@ int main()
RoyalRoad<Chrom> rr( 8 ); RoyalRoad<Chrom> rr( 8 );
eoEvalFuncCounter<Chrom> eval( rr ); eoEvalFuncCounter<Chrom> eval( rr );
eoInitVirus1bit<float> random(CHROM_SIZE, gen); eoInitVirus1bit<double> random(CHROM_SIZE, gen);
for (i = 0; i < POP_SIZE; ++i) { for (i = 0; i < POP_SIZE; ++i) {
Chrom chrom; Chrom chrom;
random(chrom); random(chrom);
@ -55,9 +55,9 @@ int main()
eoStochTournamentSelect<Chrom> lottery(0.9 ); eoStochTournamentSelect<Chrom> lottery(0.9 );
// breeder // breeder
VirusShiftMutation<float> vm; VirusShiftMutation<double> vm;
VirusTransmission<float> vt; VirusTransmission<double> vt;
VirusBitFlip<float> vf; VirusBitFlip<double> vf;
eoUBitXover<Chrom> xover; eoUBitXover<Chrom> xover;
eoProportionalOp<Chrom> propSel; eoProportionalOp<Chrom> propSel;
eoGeneralBreeder<Chrom> breeder( lottery, propSel ); eoGeneralBreeder<Chrom> breeder( lottery, propSel );