Implement [sg]etter methods for optimizer parameters

The title says it all.
This isn't a member function.  Fix incoming.