New function to check for  local minimum

I added three auxiliary functions in helper_functions.R to check whether
the cmds result is really a local minimum.
usage: check.local.minimum(res)