removed reference to rint() (what does this function do anyway? it is not ANSI and defined nowhere in eo!)

This commit is contained in:
mac 2000-04-20 11:11:58 +00:00
commit 230e1a03d1
4 changed files with 4 additions and 4 deletions

View file

@ -38,7 +38,7 @@ template<class Chrom> class eoInclusion: public eoMerge<Chrom>
*/ */
void operator()(eoPop<Chrom>& breeders, eoPop<Chrom>& pop) void operator()(eoPop<Chrom>& breeders, eoPop<Chrom>& pop)
{ {
unsigned target = min(static_cast<unsigned>(rint(pop.size() * rate())), unsigned target = min(static_cast<unsigned>(pop.size() * rate()),
pop.size() + breeders.size()); pop.size() + breeders.size());
copy(breeders.begin(), breeders.end(), copy(breeders.begin(), breeders.end(),

View file

@ -59,7 +59,7 @@ template<class Chrom> class eoInsertion: public eoMerge<Chrom>
*/ */
void operator()( eoPop<Chrom>& _breeders, eoPop<Chrom>& _pop) void operator()( eoPop<Chrom>& _breeders, eoPop<Chrom>& _pop)
{ {
unsigned target = static_cast<unsigned>(rint(_pop.size() * rate())); unsigned target = static_cast<unsigned>((_pop.size() * rate()));
_pop.swap(_breeders); _pop.swap(_breeders);

View file

@ -54,7 +54,7 @@ template<class Chrom> class eoMerge: public eoBinPopOp<Chrom>
*/ */
void operator()( eoPop<Chrom>& _breeders, eoPop<Chrom>& _pop) void operator()( eoPop<Chrom>& _breeders, eoPop<Chrom>& _pop)
{ {
unsigned target = static_cast<unsigned>(rint(_pop.size() * rate())); unsigned target = static_cast<unsigned>(_pop.size() * rate());
_pop.swap(_breeders); _pop.swap(_breeders);

View file

@ -229,7 +229,7 @@ class eoScheme: public eoAlgo<EOT>{
// everyting is read: now the consistency checks and other preliminary steps // everyting is read: now the consistency checks and other preliminary steps
nb_offspring = (nb_offspring ? nb_offspring : nb_offspring = (nb_offspring ? nb_offspring :
(int) rint (rate_offspring * popsize) ); (int) (rate_offspring * popsize) );
if (!nb_offspring) if (!nb_offspring)
nb_offspring = 1; /* al least one offspring */ nb_offspring = 1; /* al least one offspring */