redoing pso.cpp in a swarm class