C implementation of particle swarm optimization