imrproved PSO topology/velocity tests

This commit is contained in:
tlegrand 2008-04-18 08:58:42 +00:00
commit a1ee120589
4 changed files with 42 additions and 37 deletions

View file

@ -43,20 +43,20 @@ int main_function(int argc, char **argv)
eoExtendedVelocity <Particle> velocity (topology,1,1,1,1);
// the test itself
for (unsigned int i = 0; i < POP_SIZE; ++i)
for (unsigned int i = 0; i < POP_SIZE; i++)
{
std::cout << " Initial particle n°" << i << " velocity: " << std::endl;
for (unsigned int j = 0; j < VEC_SIZE; ++j)
for (unsigned int j = 0; j < VEC_SIZE; j++)
std::cout << " v" << j << "=" << pop[i].velocities[j] << std::endl;
}
for (unsigned int i = 0; i < POP_SIZE; ++i)
for (unsigned int i = 0; i < POP_SIZE; i++)
velocity (pop[i],i);
for (unsigned int i = 0; i < POP_SIZE; ++i)
for (unsigned int i = 0; i < POP_SIZE; i++)
{
std::cout << " Final particle n°" << i << " velocity: " << std::endl;
for (unsigned int j = 0; j < VEC_SIZE; ++j)
for (unsigned int j = 0; j < VEC_SIZE; j++)
std::cout << " v" << j << "=" << pop[i].velocities[j] << std::endl;
}