stan icon indicating copy to clipboard operation
stan copied to clipboard

Remove unused variational::base_family class

Open bob-carpenter opened this issue 9 years ago • 2 comments

The base class variational::base_family has no virtual methods and the one function it does define uses no member variables or functions, so can be made standalone outside of the class. Therefore, base_family should be removed.

  • [ ] remove src/stan/variational/base_family.hpp
  • [ ] move function write_error_msg_() into its own file and rename without suffix _
  • [ ] patch families/normal_meanfield.hpp and families/normal_fullrank.hpp:
    • [ ] remove references to base_family
    • [ ] change calls to write_error_msg_ to include and call new function

If the intent was to somehow pull down some of the functionality from the subclasses, then this issue should be repurposed to do that.

bob-carpenter avatar Nov 19 '15 03:11 bob-carpenter

Given recent work done in #2618 that has added some virtual methods to variational::base_family, perhaps this issue should be repurposed to move shared functionality (there is a little) to the base class.

@avehtari Thoughts?

mcol avatar Dec 16 '19 16:12 mcol

See specifically this comment https://github.com/stan-dev/stan/pull/2618#issuecomment-473595318 which contains the justification for the changes I made and why certain things are not possible.

avehtari avatar Dec 17 '19 10:12 avehtari