made expected distance to minimum (edm) computation optional when optimization has completed as the numerical gradient consumes the objective function evaluation budget