added some typename statements to make it compile without warnings under gcc3.2
This commit is contained in:
parent
5054418a66
commit
c175b152bc
10 changed files with 20 additions and 20 deletions
|
|
@ -225,7 +225,7 @@ private :
|
|||
|
||||
for (unsigned o = 0; o < value().size(); ++o)
|
||||
{
|
||||
vector<const EOT*>::iterator nth = tmp_pop.begin() + which;
|
||||
typename vector<const EOT*>::iterator nth = tmp_pop.begin() + which;
|
||||
std::nth_element(tmp_pop.begin(), nth, tmp_pop.end(), CmpFitness(o, traits::maximizing(o)));
|
||||
value()[o] = (*nth)->fitness()[o];
|
||||
}
|
||||
|
|
@ -310,7 +310,7 @@ private :
|
|||
|
||||
for (unsigned o = 0; o < traits::nObjectives(); ++o)
|
||||
{
|
||||
eoPop<EOT>::const_iterator it = max_element(_pop.begin(), _pop.end(), CmpFitness(o, traits::maximizing(o)));
|
||||
typename eoPop<EOT>::const_iterator it = max_element(_pop.begin(), _pop.end(), CmpFitness(o, traits::maximizing(o)));
|
||||
value()[o] = it->fitness()[o];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ double sum_fitness(const eoPop<EOT>& _pop)
|
|||
template <class EOT>
|
||||
double sum_fitness(const eoPop<EOT>& _pop, std::pair<double, double>& _minmax)
|
||||
{
|
||||
eoPop<EOT>::const_iterator it = _pop.begin();
|
||||
typename eoPop<EOT>::const_iterator it = _pop.begin();
|
||||
|
||||
_minmax.first = it->fitness();
|
||||
_minmax.second = it++->fitness();
|
||||
|
|
@ -156,7 +156,7 @@ const EOT& roulette_wheel(const eoPop<EOT>& _pop, double total, eoRng& _gen = rn
|
|||
if (roulette == 0.0) // covers the case where total==0.0
|
||||
return _pop[_gen.random(_pop.size())]; // uniform choice
|
||||
|
||||
eoPop<EOT>::const_iterator i = _pop.begin();
|
||||
typename eoPop<EOT>::const_iterator i = _pop.begin();
|
||||
|
||||
while (roulette > 0.0)
|
||||
{
|
||||
|
|
@ -174,7 +174,7 @@ EOT& roulette_wheel(eoPop<EOT>& _pop, double total, eoRng& _gen = rng)
|
|||
if (roulette == 0.0) // covers the case where total==0.0
|
||||
return _pop[_gen.random(_pop.size())]; // uniform choice
|
||||
|
||||
eoPop<EOT>::iterator i = _pop.begin();
|
||||
typename eoPop<EOT>::iterator i = _pop.begin();
|
||||
|
||||
while (roulette > 0.0)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue