Closed varunagrawal closed 2 years ago
Did you do a design review with Yetong? Does your PR comment give context and rationale for the change? ;-)
I was hoping this could serve as a design review. Yetong is more than welcome to shred this PR to pieces. :smile: I'll update the PR description though.
This fixes #320
This PR proposes to swap
Optimizer(const boost::shared_ptr<const OptimizerParams>& params)
with the simplerOptimizer(const OptimizerParams& params)
. Currently we make use of shared pointers for optimizer parameters which seems unnecessarily verbose since we don't expect to have more than a handful of optimizers running. By using const references, we avoid the need to callmake_shared
at various places and improve the overall readability of the code.Other benefits include being able to get quick auto-complete with the dot notation, simpler wrapping, and one less dependency on Boost.