Implement [sg]etter methods for optimizer parameters

The title says it all.