Classes for finding the maximum of a function.