Closed varunagrawal closed 2 years ago
ShareD Pointers are great for noise models, which could be used in thousands of factors or even millions. If we only create a handful or one optimizer ever, I agree it is not needed here.
That's what I figured as well. Highly unlikely we'll need hundreds of optimizer parameters ever.
Great stuff on the new updates.
However I had a question about using shared pointers as function and constructor args. Is there a reason we're doing
Optimizer(const boost::shared_ptr<const OptimizationParameters>& parameters)
instead ofOptimizer(const OptimizationParameters& parameters)
?Seems like unnecessary verbosity to me especially when
OptimizationParameters
is a simple struct (aka an encapsulation of various parameters).