(self, itr, algorithm, agent, traj_sample_lists, pol_sample_lists)
After each iteration, update the iteration data output, the cost plot,
        and the 3D trajectory visualizations (if end effector points exist).
After each iteration, update the iteration data output, the cost plot,
        and the 3D trajectory visualizations (if end effector points exist).
After each iteration update the iteration data output the cost plot and the 3D trajectory visualizations ( if end effector points exist ) .
def update(self, itr, algorithm, agent, traj_sample_lists, pol_sample_lists):
        """
        After each iteration, update the iteration data output, the cost plot,
        and the 3D trajectory visualizations (if end effector points exist).
        """
        if self._first_update:
            self._output_column_titles(algorithm)
            self._first_update = False

        costs = [np.mean(np.sum(algorithm.prev[m].cs, axis=1)) for m in range(algorithm.M)]
        self._update_iteration_data(itr, algorithm, costs, pol_sample_lists)
        self._cost_plotter.update(costs, t=itr)
        if END_EFFECTOR_POINTS in agent.x_data_types:
            self._update_trajectory_visualizations(algorithm, agent,
                    traj_sample_lists, pol_sample_lists)

        self._fig.canvas.draw()
        self._fig.canvas.flush_events()
def update ( self , itr , algorithm , agent , traj_sample_lists , pol_sample_lists ) : if self . _first_update : self . _output_column_titles ( algorithm ) self . _first_update = False costs = [ np . mean ( np . sum ( algorithm . prev [ m ] . cs , axis = 1 ) ) for m in range ( algorithm . M ) ] self . _update_iteration_data ( itr , algorithm , costs , pol_sample_lists ) self . _cost_plotter . update ( costs , t = itr ) if END_EFFECTOR_POINTS in agent . x_data_types : self . _update_trajectory_visualizations ( algorithm , agent , traj_sample_lists , pol_sample_lists ) self . _fig . canvas . draw ( ) self . _fig . canvas . flush_events ( )