You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gilles (JIRA)" <ji...@apache.org> on 2012/11/01 00:05:12 UTC

[jira] [Commented] (MATH-887) "AbstractLeastSquares" cleanup

    [ https://issues.apache.org/jira/browse/MATH-887?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13488349#comment-13488349 ] 

Gilles commented on MATH-887:
-----------------------------

On the other hand, changing the expected exception in "testMath199" will make this unit test hardly understandable since it was designed to show another problem (I mean: the issue discussed on the MATH-199 page will not be related anymore to the test case). Suggestions on what to do?

                
> "AbstractLeastSquares"  cleanup
> -------------------------------
>
>                 Key: MATH-887
>                 URL: https://issues.apache.org/jira/browse/MATH-887
>             Project: Commons Math
>          Issue Type: Task
>    Affects Versions: 3.0
>            Reporter: Gilles
>            Assignee: Gilles
>            Priority: Minor
>              Labels: api-change
>             Fix For: 3.1, 4.0
>
>         Attachments: MATH-887.diff
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira