You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 of Optimizer(const OptimizationParameters& parameters)?
Seems like unnecessary verbosity to me especially when OptimizationParameters is a simple struct (aka an encapsulation of various parameters).
The text was updated successfully, but these errors were encountered:
varunagrawal
changed the title
Need for shared pointers are arguments?
Need for shared pointers as arguments?
Dec 8, 2021
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.
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).The text was updated successfully, but these errors were encountered: