//FIXME this can be quite an expensive operation, looping through each other trajectory
for updateKey in self.optVarsHist[traj].keys():
inp = copy.deepcopy(self.optVarsHist[traj][updateKey]) //FIXME deepcopy needed?
if len(inp) < 1: //empty
continue
removeLocalFlag = True
dist = np.sqrt(np.sum(list((inp[var] - currentInput[var])**2 for var in self.getOptVars())))
if dist < self.thresholdTrajRemoval:
self.raiseADebug("Halting trajectory "{}" because it is following trajectory "{}"".format(trajToRemove,traj))
self.trajectoriesKilled[traj].append(trajToRemove)
//TODO the trajectory to remove should be chosen more carefully someday, for example, the one that has the smallest steps or lower loss value currently
removeFlag = True