Mean gradient calculation with Central and Intermediate differentiation methods added.