this is a simple implementation of a particle swarm optimizer in c++, and it's visualization using matplotlib
particles are implemented as a vector of objects. The optimize() function outputs the position of each particle on every iteration (separated by a tab), which is piped to the plotting.py file.
Set the functions in the function call to optimize() and also in the plotting.py( to get the contour plot of the objective function in the background) The blue lines represent particles The green line represents group best position