Factor the constraint into the BFGS2 class