Uploaded image for project: 'Commons Math'
  1. Commons Math
  2. MATH-887

"AbstractLeastSquares" cleanup

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Minor
    • Resolution: Implemented
    • 3.0
    • None
    • None

    Description

      Class "AbstractLeastSquares" (in package "o.a.c.m.optimization.general") has a lot of "protected" fields that are modified by its subclasses (e.g. "LevenbergMarquardt"). This decreases encapsulation which in turn makes the code more difficult to understand and modify.
      I propose to deprecate (in 3.1) and remove or make "private" (in 4.0) all fields that could be hidden or should be modified through setter methods.

      Part of the code could also be more readable (and self-documenting) by making use of higher-level constructs such as "RealMatrix" rather than using explicit loops.

      Attachments

        1. MATH-887.diff
          11 kB
          Gilles Sadowski

        Issue Links

          Activity

            People

              erans Gilles Sadowski
              erans Gilles Sadowski
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: