You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sébastien Brisard (Created JIRA)" <ji...@apache.org> on 2012/03/03 20:19:57 UTC

[jira] [Created] (MATH-761) Improve encapsulation of data in the nested classes of SymmLQ

Improve encapsulation of data in the nested classes of SymmLQ
-------------------------------------------------------------

                 Key: MATH-761
                 URL: https://issues.apache.org/jira/browse/MATH-761
             Project: Commons Math
          Issue Type: Improvement
    Affects Versions: 3.1
            Reporter: Sébastien Brisard
            Assignee: Sébastien Brisard


In order to limit object creation, the current implementation of the {{SymmLQ}} solver makes heavy use of references accross nested classes in {{SymmLQ}}. This makes the code difficult to read, and should be modified, keeping the public API.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (MATH-761) Improve encapsulation of data in the nested classes of SymmLQ

Posted by "Sébastien Brisard (Commented JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13235418#comment-13235418 ] 

Sébastien Brisard commented on MATH-761:
----------------------------------------

In {{r1303674}}, created
* {{RealVector getRightHandSideVector()}},
* {{RealVector getSolution()}},
* {{double getNormOfResidual()}}.
                
> Improve encapsulation of data in the nested classes of SymmLQ
> -------------------------------------------------------------
>
>                 Key: MATH-761
>                 URL: https://issues.apache.org/jira/browse/MATH-761
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.1
>            Reporter: Sébastien Brisard
>            Assignee: Sébastien Brisard
>              Labels: linear
>
> In order to limit object creation, the current implementation of the {{SymmLQ}} solver makes heavy use of references accross nested classes in {{SymmLQ}}. This makes the code difficult to read, and should be modified, keeping the public API.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Issue Comment Edited] (MATH-761) Improve encapsulation of data in the nested classes of SymmLQ

Posted by "Sébastien Brisard (Issue Comment Edited JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13232487#comment-13232487 ] 

Sébastien Brisard edited comment on MATH-761 at 3/20/12 6:39 AM:
-----------------------------------------------------------------

In {{r1302298}} and {{r1302785}}
* moved some {{static}} helper methods from {{SymmLQ}} to nested class {{SymmLQ.State}}
* changed visibility of some {{static}} fields from {{private}} to {{package protected}} in order to avoid the use of synthetic getters.
                
      was (Author: celestin):
    In {{r1302298}}
* moved some {{static}} helper methods from {{SymmLQ}} to nested class {{SymmLQ.State}}
* changed visibility of some {{static}} fields from {{private}} to {{protected}} in order to avoid the use of synthetic getters.
                  
> Improve encapsulation of data in the nested classes of SymmLQ
> -------------------------------------------------------------
>
>                 Key: MATH-761
>                 URL: https://issues.apache.org/jira/browse/MATH-761
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.1
>            Reporter: Sébastien Brisard
>            Assignee: Sébastien Brisard
>              Labels: linear
>
> In order to limit object creation, the current implementation of the {{SymmLQ}} solver makes heavy use of references accross nested classes in {{SymmLQ}}. This makes the code difficult to read, and should be modified, keeping the public API.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Resolved] (MATH-761) Improve encapsulation of data in the nested classes of SymmLQ

Posted by "Sébastien Brisard (Resolved JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MATH-761?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sébastien Brisard resolved MATH-761.
------------------------------------

       Resolution: Fixed
    Fix Version/s: 3.1
    
> Improve encapsulation of data in the nested classes of SymmLQ
> -------------------------------------------------------------
>
>                 Key: MATH-761
>                 URL: https://issues.apache.org/jira/browse/MATH-761
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.1
>            Reporter: Sébastien Brisard
>            Assignee: Sébastien Brisard
>              Labels: linear
>             Fix For: 3.1
>
>
> In order to limit object creation, the current implementation of the {{SymmLQ}} solver makes heavy use of references accross nested classes in {{SymmLQ}}. This makes the code difficult to read, and should be modified, keeping the public API.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (MATH-761) Improve encapsulation of data in the nested classes of SymmLQ

Posted by "Sébastien Brisard (Commented JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13232486#comment-13232486 ] 

Sébastien Brisard commented on MATH-761:
----------------------------------------

In {{r1302261}}, nested class {{State}} was made static.
                
> Improve encapsulation of data in the nested classes of SymmLQ
> -------------------------------------------------------------
>
>                 Key: MATH-761
>                 URL: https://issues.apache.org/jira/browse/MATH-761
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.1
>            Reporter: Sébastien Brisard
>            Assignee: Sébastien Brisard
>              Labels: linear
>
> In order to limit object creation, the current implementation of the {{SymmLQ}} solver makes heavy use of references accross nested classes in {{SymmLQ}}. This makes the code difficult to read, and should be modified, keeping the public API.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (MATH-761) Improve encapsulation of data in the nested classes of SymmLQ

Posted by "Sébastien Brisard (Commented JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13236994#comment-13236994 ] 

Sébastien Brisard commented on MATH-761:
----------------------------------------

As of {{r1303674}}, the last breach in data encapsulation is the reference to an instance of {{SymmLQ.State}} that {{SymmLQ.SymmLQEvent}} keeps. The rationale for this is the ability to call {{SymmLQ.State.moveToCG(RealVector)}} from within {{SymmLQ.SymmLQEvent}}. Indeed, throughout the iterations, the SYMMLQ algorithm does not evaluate the current estimate of the solution to the linear system. After the iterations have converged, a final refinement is performed to get the solution. However, the current estimate of the solution *should* be accessible from the events fired by {{SymmLQ}}. In order to spare some CPU time, this estimate is lazily initialized when {{SymmLQ.SymmLQEvent.getSolution()}} is called. This leads to rather unwanted sharing of data between different classes.

Monitoring shows that the gain provided by this lazy initialization is in fact negligible for decently large linear systems. It is therefore decided that the refinement of the solution should be evaluated *at each iteration* in the main loop of the SYMMLQ algo, rather than on demand in the {{SymmLQEvent}}. This allows better data encapsulation in {{SymmLQ.State}}. More precisely, all vector updates occur *explicitely* instead of transparently (through the use of references). Also, {{SymmLQEvent}} can be completely removed, and replaced with {{DefaultIterativeLinearSolverEvent}}.

All these changes are performed in {{r1304574}}.
                
> Improve encapsulation of data in the nested classes of SymmLQ
> -------------------------------------------------------------
>
>                 Key: MATH-761
>                 URL: https://issues.apache.org/jira/browse/MATH-761
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.1
>            Reporter: Sébastien Brisard
>            Assignee: Sébastien Brisard
>              Labels: linear
>
> In order to limit object creation, the current implementation of the {{SymmLQ}} solver makes heavy use of references accross nested classes in {{SymmLQ}}. This makes the code difficult to read, and should be modified, keeping the public API.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (MATH-761) Improve encapsulation of data in the nested classes of SymmLQ

Posted by "Sébastien Brisard (Commented JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13233273#comment-13233273 ] 

Sébastien Brisard commented on MATH-761:
----------------------------------------

In {{r1302788}}, created {{SymmLQ.State.hasConverged()}} in order to avoid access to private field {{SymmLQ.State.hasConverged}} through synthetic getter.
                
> Improve encapsulation of data in the nested classes of SymmLQ
> -------------------------------------------------------------
>
>                 Key: MATH-761
>                 URL: https://issues.apache.org/jira/browse/MATH-761
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.1
>            Reporter: Sébastien Brisard
>            Assignee: Sébastien Brisard
>              Labels: linear
>
> In order to limit object creation, the current implementation of the {{SymmLQ}} solver makes heavy use of references accross nested classes in {{SymmLQ}}. This makes the code difficult to read, and should be modified, keeping the public API.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (MATH-761) Improve encapsulation of data in the nested classes of SymmLQ

Posted by "Sébastien Brisard (Commented JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13234117#comment-13234117 ] 

Sébastien Brisard commented on MATH-761:
----------------------------------------

In {{r1303290}}, created
* {{boolean SymmLQ.State.bEqualsNullVector()}},
* {{boolean SymmLQ.State.betaEqualsZero()}}.
                
> Improve encapsulation of data in the nested classes of SymmLQ
> -------------------------------------------------------------
>
>                 Key: MATH-761
>                 URL: https://issues.apache.org/jira/browse/MATH-761
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.1
>            Reporter: Sébastien Brisard
>            Assignee: Sébastien Brisard
>              Labels: linear
>
> In order to limit object creation, the current implementation of the {{SymmLQ}} solver makes heavy use of references accross nested classes in {{SymmLQ}}. This makes the code difficult to read, and should be modified, keeping the public API.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (MATH-761) Improve encapsulation of data in the nested classes of SymmLQ

Posted by "Sébastien Brisard (Commented JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13232487#comment-13232487 ] 

Sébastien Brisard commented on MATH-761:
----------------------------------------

In {{r1302298}}
* moved some {{static}} helper methods from {{SymmLQ}} to nested class {{SymmLQ.State}}
* changed visibility of some {{static}} fields from {{private}} to {{protected}} in order to avoid the use of synthetic getters.
                
> Improve encapsulation of data in the nested classes of SymmLQ
> -------------------------------------------------------------
>
>                 Key: MATH-761
>                 URL: https://issues.apache.org/jira/browse/MATH-761
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.1
>            Reporter: Sébastien Brisard
>            Assignee: Sébastien Brisard
>              Labels: linear
>
> In order to limit object creation, the current implementation of the {{SymmLQ}} solver makes heavy use of references accross nested classes in {{SymmLQ}}. This makes the code difficult to read, and should be modified, keeping the public API.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira