Initial commit of functions from github.com/btracey/optimize

`return currGrad >= gradConst*initGrad`