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/01/28 10:33:11 UTC

[jira] [Created] (MATH-735) Improvements to linear iterative solvers

Improvements to linear iterative solvers
----------------------------------------

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


Before we release version 3.0, I would like to perform some changes to the general framework for linear iterative solvers.
# Remove interface {{InvertibleRealLinearOperator}}: this was only proposed for handling preconditioners. Let {{M}} be this preconditioner. In the course of the iterations, only matrix-vector products of the form {{M^(-1) . y}} are needed, never direct products {{M . x}}. So it's just as simple to provide {{M^(-1)}} as a standard {{RealLinearOperator}}, rather than {{M}} as an {{InvertibleRealLinearOperator}}. This removes a little bit of clutter in the class hierarchy.
# {{o.a.c.m.util.IterationEvent}} should at the very least have a method to get the current iteration number. Overwise, I find myself keeping track of the number of times {{o.a.c.m.util.IterationManager.fireIterationPerformedEvent(IterationEvent)}} is called, which is both ugly and painfull.
# {{o.a.c.m.util.linear.IterativeLinearSolverEvent}} should have a method to access the norm of the residual. I was reluctant to specify such a method in the interface at the start, because I was not sure any iterative solver provides an updated estimate of this quantity at each iteration. In fact, I've realized that most (if not all) solvers do, and it's quite nice to be able to access this value while monitoring the progress of the inversion (through {{o.a.c.m.utils.IterationListener}}). Otherwise, one has to compute {{b - A . x}} inside the listener, which *doubles* the cost of each iteration!
# {{o.a.c.m.util.linear.IterativeLinearSolverEvent}} should have a method to access the residual (the vector itself, not only its norm). I'm not sure *all* solvers can do that, so this should be an optional feature, which might be useful. I see two different possible implementations
## specify {{RealVector o.a.c.m.util.linear.IterativeLinearSolverEvent.getResidual()}} as an optional feature (potentially throwing {{UnsupportedOperationException}}), together with a method {{boolean o.a.c.m.util.linear.IterativeLinearSolverEvent.providesResidual()}}. I think some of us do not like {{UnsupportedOperationException}}, but this would be similar to what was done in {{RealLinearOperator.operateTranspose(RealVector)}}.
## create a new interface {{RealVector o.a.c.m.util.linear.IterativeLinearSolverWithResidualEvent}}.

I would love to have some feedback on the last point.

--
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] [Updated] (MATH-735) Improvements to linear iterative solvers

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

Sébastien Brisard updated MATH-735:
-----------------------------------

    Description: 
Before we release version 3.0, I would like to perform some changes to the general framework for linear iterative solvers.
# Remove interface {{InvertibleRealLinearOperator}}: this was only proposed for handling preconditioners. Let {{M}} be this preconditioner. In the course of the iterations, only matrix-vector products of the form {{M^(-1) . y}} are needed, never direct products {{M . x}}. So it's just as simple to provide {{M^(-1)}} as a standard {{RealLinearOperator}}, rather than {{M}} as an {{InvertibleRealLinearOperator}}. This removes a little bit of clutter in the class hierarchy.
# {{o.a.c.m.util.IterationEvent}} should at the very least have a method to get the current iteration number. Overwise, I find myself keeping track of the number of times {{o.a.c.m.util.IterationManager.fireIterationPerformedEvent(IterationEvent)}} is called, which is both ugly and painfull.
# {{o.a.c.m.util.linear.IterativeLinearSolverEvent}} should have a method to access the norm of the residual. I was reluctant to specify such a method in the interface at the start, because I was not sure any iterative solver provides an updated estimate of this quantity at each iteration. In fact, I've realized that most (if not all) solvers do, and it's quite nice to be able to access this value while monitoring the progress of the inversion (through {{o.a.c.m.utils.IterationListener}}). Otherwise, one has to compute {{b - A . x}} inside the listener, which *doubles* the cost of each iteration!
# {{o.a.c.m.util.linear.IterativeLinearSolverEvent}} should have a method to access the residual (the vector itself, not only its norm). I'm not sure *all* solvers can do that, so this should be an optional feature, which might be useful. I see two different possible implementations
## specify {{RealVector o.a.c.m.util.linear.IterativeLinearSolverEvent.getResidual()}} as an optional feature (potentially throwing {{UnsupportedOperationException}}), together with a method {{boolean o.a.c.m.util.linear.IterativeLinearSolverEvent.providesResidual()}}. I think some of us do not like {{UnsupportedOperationException}}, but this would be similar to what was done in {{RealLinearOperator.operateTranspose(RealVector)}}.
## create a new interface {{RealVector o.a.c.m.util.linear.IterativeLinearSolverWithResidualEvent}}. This is similar to what is done currently, see {{o.a.c.m.linear.ProvidesResidual}}.

I would love to have some feedback on the last point.

  was:
Before we release version 3.0, I would like to perform some changes to the general framework for linear iterative solvers.
# Remove interface {{InvertibleRealLinearOperator}}: this was only proposed for handling preconditioners. Let {{M}} be this preconditioner. In the course of the iterations, only matrix-vector products of the form {{M^(-1) . y}} are needed, never direct products {{M . x}}. So it's just as simple to provide {{M^(-1)}} as a standard {{RealLinearOperator}}, rather than {{M}} as an {{InvertibleRealLinearOperator}}. This removes a little bit of clutter in the class hierarchy.
# {{o.a.c.m.util.IterationEvent}} should at the very least have a method to get the current iteration number. Overwise, I find myself keeping track of the number of times {{o.a.c.m.util.IterationManager.fireIterationPerformedEvent(IterationEvent)}} is called, which is both ugly and painfull.
# {{o.a.c.m.util.linear.IterativeLinearSolverEvent}} should have a method to access the norm of the residual. I was reluctant to specify such a method in the interface at the start, because I was not sure any iterative solver provides an updated estimate of this quantity at each iteration. In fact, I've realized that most (if not all) solvers do, and it's quite nice to be able to access this value while monitoring the progress of the inversion (through {{o.a.c.m.utils.IterationListener}}). Otherwise, one has to compute {{b - A . x}} inside the listener, which *doubles* the cost of each iteration!
# {{o.a.c.m.util.linear.IterativeLinearSolverEvent}} should have a method to access the residual (the vector itself, not only its norm). I'm not sure *all* solvers can do that, so this should be an optional feature, which might be useful. I see two different possible implementations
## specify {{RealVector o.a.c.m.util.linear.IterativeLinearSolverEvent.getResidual()}} as an optional feature (potentially throwing {{UnsupportedOperationException}}), together with a method {{boolean o.a.c.m.util.linear.IterativeLinearSolverEvent.providesResidual()}}. I think some of us do not like {{UnsupportedOperationException}}, but this would be similar to what was done in {{RealLinearOperator.operateTranspose(RealVector)}}.
## create a new interface {{RealVector o.a.c.m.util.linear.IterativeLinearSolverWithResidualEvent}}.

I would love to have some feedback on the last point.

    
> Improvements to linear iterative solvers
> ----------------------------------------
>
>                 Key: MATH-735
>                 URL: https://issues.apache.org/jira/browse/MATH-735
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.0
>            Reporter: Sébastien Brisard
>            Assignee: Sébastien Brisard
>              Labels: event, linear, solver
>
> Before we release version 3.0, I would like to perform some changes to the general framework for linear iterative solvers.
> # Remove interface {{InvertibleRealLinearOperator}}: this was only proposed for handling preconditioners. Let {{M}} be this preconditioner. In the course of the iterations, only matrix-vector products of the form {{M^(-1) . y}} are needed, never direct products {{M . x}}. So it's just as simple to provide {{M^(-1)}} as a standard {{RealLinearOperator}}, rather than {{M}} as an {{InvertibleRealLinearOperator}}. This removes a little bit of clutter in the class hierarchy.
> # {{o.a.c.m.util.IterationEvent}} should at the very least have a method to get the current iteration number. Overwise, I find myself keeping track of the number of times {{o.a.c.m.util.IterationManager.fireIterationPerformedEvent(IterationEvent)}} is called, which is both ugly and painfull.
> # {{o.a.c.m.util.linear.IterativeLinearSolverEvent}} should have a method to access the norm of the residual. I was reluctant to specify such a method in the interface at the start, because I was not sure any iterative solver provides an updated estimate of this quantity at each iteration. In fact, I've realized that most (if not all) solvers do, and it's quite nice to be able to access this value while monitoring the progress of the inversion (through {{o.a.c.m.utils.IterationListener}}). Otherwise, one has to compute {{b - A . x}} inside the listener, which *doubles* the cost of each iteration!
> # {{o.a.c.m.util.linear.IterativeLinearSolverEvent}} should have a method to access the residual (the vector itself, not only its norm). I'm not sure *all* solvers can do that, so this should be an optional feature, which might be useful. I see two different possible implementations
> ## specify {{RealVector o.a.c.m.util.linear.IterativeLinearSolverEvent.getResidual()}} as an optional feature (potentially throwing {{UnsupportedOperationException}}), together with a method {{boolean o.a.c.m.util.linear.IterativeLinearSolverEvent.providesResidual()}}. I think some of us do not like {{UnsupportedOperationException}}, but this would be similar to what was done in {{RealLinearOperator.operateTranspose(RealVector)}}.
> ## create a new interface {{RealVector o.a.c.m.util.linear.IterativeLinearSolverWithResidualEvent}}. This is similar to what is done currently, see {{o.a.c.m.linear.ProvidesResidual}}.
> I would love to have some feedback on the last point.

--
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] [Closed] (MATH-735) Improvements to linear iterative solvers

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

Sébastien Brisard closed MATH-735.
----------------------------------


Fixed in 3.0.
                
> Improvements to linear iterative solvers
> ----------------------------------------
>
>                 Key: MATH-735
>                 URL: https://issues.apache.org/jira/browse/MATH-735
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.0
>            Reporter: Sébastien Brisard
>            Assignee: Sébastien Brisard
>              Labels: event, linear, solver
>
> Before we release version 3.0, I would like to perform some changes to the general framework for linear iterative solvers.
> # Remove interface {{InvertibleRealLinearOperator}}: this was only proposed for handling preconditioners. Let {{M}} be this preconditioner. In the course of the iterations, only matrix-vector products of the form {{M^(-1) . y}} are needed, never direct products {{M . x}}. So it's just as simple to provide {{M^(-1)}} as a standard {{RealLinearOperator}}, rather than {{M}} as an {{InvertibleRealLinearOperator}}. This removes a little bit of clutter in the class hierarchy.
> # {{o.a.c.m.util.IterationEvent}} should at the very least have a method to get the current iteration number. Overwise, I find myself keeping track of the number of times {{o.a.c.m.util.IterationManager.fireIterationPerformedEvent(IterationEvent)}} is called, which is both ugly and painfull.
> # {{o.a.c.m.util.linear.IterativeLinearSolverEvent}} should have a method to access the norm of the residual. I was reluctant to specify such a method in the interface at the start, because I was not sure any iterative solver provides an updated estimate of this quantity at each iteration. In fact, I've realized that most (if not all) solvers do, and it's quite nice to be able to access this value while monitoring the progress of the inversion (through {{o.a.c.m.utils.IterationListener}}). Otherwise, one has to compute {{b - A . x}} inside the listener, which *doubles* the cost of each iteration!
> # {{o.a.c.m.util.linear.IterativeLinearSolverEvent}} should have a method to access the residual (the vector itself, not only its norm). I'm not sure *all* solvers can do that, so this should be an optional feature, which might be useful. I see two different possible implementations
> ## specify {{RealVector o.a.c.m.util.linear.IterativeLinearSolverEvent.getResidual()}} as an optional feature (potentially throwing {{UnsupportedOperationException}}), together with a method {{boolean o.a.c.m.util.linear.IterativeLinearSolverEvent.providesResidual()}}. I think some of us do not like {{UnsupportedOperationException}}, but this would be similar to what was done in {{RealLinearOperator.operateTranspose(RealVector)}}.
> ## create a new interface {{RealVector o.a.c.m.util.linear.IterativeLinearSolverWithResidualEvent}}. This is similar to what is done currently, see {{o.a.c.m.linear.ProvidesResidual}}.
> I would love to have some feedback on the last point.

--
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-735) Improvements to linear iterative solvers

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

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

    Resolution: Fixed

All suggested changes successfully implemented.
                
> Improvements to linear iterative solvers
> ----------------------------------------
>
>                 Key: MATH-735
>                 URL: https://issues.apache.org/jira/browse/MATH-735
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.0
>            Reporter: Sébastien Brisard
>            Assignee: Sébastien Brisard
>              Labels: event, linear, solver
>
> Before we release version 3.0, I would like to perform some changes to the general framework for linear iterative solvers.
> # Remove interface {{InvertibleRealLinearOperator}}: this was only proposed for handling preconditioners. Let {{M}} be this preconditioner. In the course of the iterations, only matrix-vector products of the form {{M^(-1) . y}} are needed, never direct products {{M . x}}. So it's just as simple to provide {{M^(-1)}} as a standard {{RealLinearOperator}}, rather than {{M}} as an {{InvertibleRealLinearOperator}}. This removes a little bit of clutter in the class hierarchy.
> # {{o.a.c.m.util.IterationEvent}} should at the very least have a method to get the current iteration number. Overwise, I find myself keeping track of the number of times {{o.a.c.m.util.IterationManager.fireIterationPerformedEvent(IterationEvent)}} is called, which is both ugly and painfull.
> # {{o.a.c.m.util.linear.IterativeLinearSolverEvent}} should have a method to access the norm of the residual. I was reluctant to specify such a method in the interface at the start, because I was not sure any iterative solver provides an updated estimate of this quantity at each iteration. In fact, I've realized that most (if not all) solvers do, and it's quite nice to be able to access this value while monitoring the progress of the inversion (through {{o.a.c.m.utils.IterationListener}}). Otherwise, one has to compute {{b - A . x}} inside the listener, which *doubles* the cost of each iteration!
> # {{o.a.c.m.util.linear.IterativeLinearSolverEvent}} should have a method to access the residual (the vector itself, not only its norm). I'm not sure *all* solvers can do that, so this should be an optional feature, which might be useful. I see two different possible implementations
> ## specify {{RealVector o.a.c.m.util.linear.IterativeLinearSolverEvent.getResidual()}} as an optional feature (potentially throwing {{UnsupportedOperationException}}), together with a method {{boolean o.a.c.m.util.linear.IterativeLinearSolverEvent.providesResidual()}}. I think some of us do not like {{UnsupportedOperationException}}, but this would be similar to what was done in {{RealLinearOperator.operateTranspose(RealVector)}}.
> ## create a new interface {{RealVector o.a.c.m.util.linear.IterativeLinearSolverWithResidualEvent}}. This is similar to what is done currently, see {{o.a.c.m.linear.ProvidesResidual}}.
> I would love to have some feedback on the last point.

--
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-735) Improvements to linear iterative solvers

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

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

Item 3 is implemented in {{r1237069}}.
                
> Improvements to linear iterative solvers
> ----------------------------------------
>
>                 Key: MATH-735
>                 URL: https://issues.apache.org/jira/browse/MATH-735
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.0
>            Reporter: Sébastien Brisard
>            Assignee: Sébastien Brisard
>              Labels: event, linear, solver
>
> Before we release version 3.0, I would like to perform some changes to the general framework for linear iterative solvers.
> # Remove interface {{InvertibleRealLinearOperator}}: this was only proposed for handling preconditioners. Let {{M}} be this preconditioner. In the course of the iterations, only matrix-vector products of the form {{M^(-1) . y}} are needed, never direct products {{M . x}}. So it's just as simple to provide {{M^(-1)}} as a standard {{RealLinearOperator}}, rather than {{M}} as an {{InvertibleRealLinearOperator}}. This removes a little bit of clutter in the class hierarchy.
> # {{o.a.c.m.util.IterationEvent}} should at the very least have a method to get the current iteration number. Overwise, I find myself keeping track of the number of times {{o.a.c.m.util.IterationManager.fireIterationPerformedEvent(IterationEvent)}} is called, which is both ugly and painfull.
> # {{o.a.c.m.util.linear.IterativeLinearSolverEvent}} should have a method to access the norm of the residual. I was reluctant to specify such a method in the interface at the start, because I was not sure any iterative solver provides an updated estimate of this quantity at each iteration. In fact, I've realized that most (if not all) solvers do, and it's quite nice to be able to access this value while monitoring the progress of the inversion (through {{o.a.c.m.utils.IterationListener}}). Otherwise, one has to compute {{b - A . x}} inside the listener, which *doubles* the cost of each iteration!
> # {{o.a.c.m.util.linear.IterativeLinearSolverEvent}} should have a method to access the residual (the vector itself, not only its norm). I'm not sure *all* solvers can do that, so this should be an optional feature, which might be useful. I see two different possible implementations
> ## specify {{RealVector o.a.c.m.util.linear.IterativeLinearSolverEvent.getResidual()}} as an optional feature (potentially throwing {{UnsupportedOperationException}}), together with a method {{boolean o.a.c.m.util.linear.IterativeLinearSolverEvent.providesResidual()}}. I think some of us do not like {{UnsupportedOperationException}}, but this would be similar to what was done in {{RealLinearOperator.operateTranspose(RealVector)}}.
> ## create a new interface {{RealVector o.a.c.m.util.linear.IterativeLinearSolverWithResidualEvent}}. This is similar to what is done currently, see {{o.a.c.m.linear.ProvidesResidual}}.
> I would love to have some feedback on the last point.

--
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-735) Improvements to linear iterative solvers

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

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

Item 1 is implemented in {{r1237229}}.
                
> Improvements to linear iterative solvers
> ----------------------------------------
>
>                 Key: MATH-735
>                 URL: https://issues.apache.org/jira/browse/MATH-735
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.0
>            Reporter: Sébastien Brisard
>            Assignee: Sébastien Brisard
>              Labels: event, linear, solver
>
> Before we release version 3.0, I would like to perform some changes to the general framework for linear iterative solvers.
> # Remove interface {{InvertibleRealLinearOperator}}: this was only proposed for handling preconditioners. Let {{M}} be this preconditioner. In the course of the iterations, only matrix-vector products of the form {{M^(-1) . y}} are needed, never direct products {{M . x}}. So it's just as simple to provide {{M^(-1)}} as a standard {{RealLinearOperator}}, rather than {{M}} as an {{InvertibleRealLinearOperator}}. This removes a little bit of clutter in the class hierarchy.
> # {{o.a.c.m.util.IterationEvent}} should at the very least have a method to get the current iteration number. Overwise, I find myself keeping track of the number of times {{o.a.c.m.util.IterationManager.fireIterationPerformedEvent(IterationEvent)}} is called, which is both ugly and painfull.
> # {{o.a.c.m.util.linear.IterativeLinearSolverEvent}} should have a method to access the norm of the residual. I was reluctant to specify such a method in the interface at the start, because I was not sure any iterative solver provides an updated estimate of this quantity at each iteration. In fact, I've realized that most (if not all) solvers do, and it's quite nice to be able to access this value while monitoring the progress of the inversion (through {{o.a.c.m.utils.IterationListener}}). Otherwise, one has to compute {{b - A . x}} inside the listener, which *doubles* the cost of each iteration!
> # {{o.a.c.m.util.linear.IterativeLinearSolverEvent}} should have a method to access the residual (the vector itself, not only its norm). I'm not sure *all* solvers can do that, so this should be an optional feature, which might be useful. I see two different possible implementations
> ## specify {{RealVector o.a.c.m.util.linear.IterativeLinearSolverEvent.getResidual()}} as an optional feature (potentially throwing {{UnsupportedOperationException}}), together with a method {{boolean o.a.c.m.util.linear.IterativeLinearSolverEvent.providesResidual()}}. I think some of us do not like {{UnsupportedOperationException}}, but this would be similar to what was done in {{RealLinearOperator.operateTranspose(RealVector)}}.
> ## create a new interface {{RealVector o.a.c.m.util.linear.IterativeLinearSolverWithResidualEvent}}. This is similar to what is done currently, see {{o.a.c.m.linear.ProvidesResidual}}.
> I would love to have some feedback on the last point.

--
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-735) Improvements to linear iterative solvers

Posted by "Luc Maisonobe (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-735?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13195491#comment-13195491 ] 

Luc Maisonobe commented on MATH-735:
------------------------------------

I don't like much UnsupportedOperationException, but if you also add a providesResidual method, then I am OK with this.
                
> Improvements to linear iterative solvers
> ----------------------------------------
>
>                 Key: MATH-735
>                 URL: https://issues.apache.org/jira/browse/MATH-735
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.0
>            Reporter: Sébastien Brisard
>            Assignee: Sébastien Brisard
>              Labels: event, linear, solver
>
> Before we release version 3.0, I would like to perform some changes to the general framework for linear iterative solvers.
> # Remove interface {{InvertibleRealLinearOperator}}: this was only proposed for handling preconditioners. Let {{M}} be this preconditioner. In the course of the iterations, only matrix-vector products of the form {{M^(-1) . y}} are needed, never direct products {{M . x}}. So it's just as simple to provide {{M^(-1)}} as a standard {{RealLinearOperator}}, rather than {{M}} as an {{InvertibleRealLinearOperator}}. This removes a little bit of clutter in the class hierarchy.
> # {{o.a.c.m.util.IterationEvent}} should at the very least have a method to get the current iteration number. Overwise, I find myself keeping track of the number of times {{o.a.c.m.util.IterationManager.fireIterationPerformedEvent(IterationEvent)}} is called, which is both ugly and painfull.
> # {{o.a.c.m.util.linear.IterativeLinearSolverEvent}} should have a method to access the norm of the residual. I was reluctant to specify such a method in the interface at the start, because I was not sure any iterative solver provides an updated estimate of this quantity at each iteration. In fact, I've realized that most (if not all) solvers do, and it's quite nice to be able to access this value while monitoring the progress of the inversion (through {{o.a.c.m.utils.IterationListener}}). Otherwise, one has to compute {{b - A . x}} inside the listener, which *doubles* the cost of each iteration!
> # {{o.a.c.m.util.linear.IterativeLinearSolverEvent}} should have a method to access the residual (the vector itself, not only its norm). I'm not sure *all* solvers can do that, so this should be an optional feature, which might be useful. I see two different possible implementations
> ## specify {{RealVector o.a.c.m.util.linear.IterativeLinearSolverEvent.getResidual()}} as an optional feature (potentially throwing {{UnsupportedOperationException}}), together with a method {{boolean o.a.c.m.util.linear.IterativeLinearSolverEvent.providesResidual()}}. I think some of us do not like {{UnsupportedOperationException}}, but this would be similar to what was done in {{RealLinearOperator.operateTranspose(RealVector)}}.
> ## create a new interface {{RealVector o.a.c.m.util.linear.IterativeLinearSolverWithResidualEvent}}. This is similar to what is done currently, see {{o.a.c.m.linear.ProvidesResidual}}.
> I would love to have some feedback on the last point.

--
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-735) Improvements to linear iterative solvers

Posted by "Thomas Neidhart (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-735?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13195472#comment-13195472 ] 

Thomas Neidhart commented on MATH-735:
--------------------------------------

+1 on bullet 1, this solution is much more elegant. 
                
> Improvements to linear iterative solvers
> ----------------------------------------
>
>                 Key: MATH-735
>                 URL: https://issues.apache.org/jira/browse/MATH-735
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.0
>            Reporter: Sébastien Brisard
>            Assignee: Sébastien Brisard
>              Labels: event, linear, solver
>
> Before we release version 3.0, I would like to perform some changes to the general framework for linear iterative solvers.
> # Remove interface {{InvertibleRealLinearOperator}}: this was only proposed for handling preconditioners. Let {{M}} be this preconditioner. In the course of the iterations, only matrix-vector products of the form {{M^(-1) . y}} are needed, never direct products {{M . x}}. So it's just as simple to provide {{M^(-1)}} as a standard {{RealLinearOperator}}, rather than {{M}} as an {{InvertibleRealLinearOperator}}. This removes a little bit of clutter in the class hierarchy.
> # {{o.a.c.m.util.IterationEvent}} should at the very least have a method to get the current iteration number. Overwise, I find myself keeping track of the number of times {{o.a.c.m.util.IterationManager.fireIterationPerformedEvent(IterationEvent)}} is called, which is both ugly and painfull.
> # {{o.a.c.m.util.linear.IterativeLinearSolverEvent}} should have a method to access the norm of the residual. I was reluctant to specify such a method in the interface at the start, because I was not sure any iterative solver provides an updated estimate of this quantity at each iteration. In fact, I've realized that most (if not all) solvers do, and it's quite nice to be able to access this value while monitoring the progress of the inversion (through {{o.a.c.m.utils.IterationListener}}). Otherwise, one has to compute {{b - A . x}} inside the listener, which *doubles* the cost of each iteration!
> # {{o.a.c.m.util.linear.IterativeLinearSolverEvent}} should have a method to access the residual (the vector itself, not only its norm). I'm not sure *all* solvers can do that, so this should be an optional feature, which might be useful. I see two different possible implementations
> ## specify {{RealVector o.a.c.m.util.linear.IterativeLinearSolverEvent.getResidual()}} as an optional feature (potentially throwing {{UnsupportedOperationException}}), together with a method {{boolean o.a.c.m.util.linear.IterativeLinearSolverEvent.providesResidual()}}. I think some of us do not like {{UnsupportedOperationException}}, but this would be similar to what was done in {{RealLinearOperator.operateTranspose(RealVector)}}.
> ## create a new interface {{RealVector o.a.c.m.util.linear.IterativeLinearSolverWithResidualEvent}}.
> I would love to have some feedback on the last point.

--
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-735) Improvements to linear iterative solvers

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

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

Item 4.1 implemented in {{r1238905}}.
                
> Improvements to linear iterative solvers
> ----------------------------------------
>
>                 Key: MATH-735
>                 URL: https://issues.apache.org/jira/browse/MATH-735
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.0
>            Reporter: Sébastien Brisard
>            Assignee: Sébastien Brisard
>              Labels: event, linear, solver
>
> Before we release version 3.0, I would like to perform some changes to the general framework for linear iterative solvers.
> # Remove interface {{InvertibleRealLinearOperator}}: this was only proposed for handling preconditioners. Let {{M}} be this preconditioner. In the course of the iterations, only matrix-vector products of the form {{M^(-1) . y}} are needed, never direct products {{M . x}}. So it's just as simple to provide {{M^(-1)}} as a standard {{RealLinearOperator}}, rather than {{M}} as an {{InvertibleRealLinearOperator}}. This removes a little bit of clutter in the class hierarchy.
> # {{o.a.c.m.util.IterationEvent}} should at the very least have a method to get the current iteration number. Overwise, I find myself keeping track of the number of times {{o.a.c.m.util.IterationManager.fireIterationPerformedEvent(IterationEvent)}} is called, which is both ugly and painfull.
> # {{o.a.c.m.util.linear.IterativeLinearSolverEvent}} should have a method to access the norm of the residual. I was reluctant to specify such a method in the interface at the start, because I was not sure any iterative solver provides an updated estimate of this quantity at each iteration. In fact, I've realized that most (if not all) solvers do, and it's quite nice to be able to access this value while monitoring the progress of the inversion (through {{o.a.c.m.utils.IterationListener}}). Otherwise, one has to compute {{b - A . x}} inside the listener, which *doubles* the cost of each iteration!
> # {{o.a.c.m.util.linear.IterativeLinearSolverEvent}} should have a method to access the residual (the vector itself, not only its norm). I'm not sure *all* solvers can do that, so this should be an optional feature, which might be useful. I see two different possible implementations
> ## specify {{RealVector o.a.c.m.util.linear.IterativeLinearSolverEvent.getResidual()}} as an optional feature (potentially throwing {{UnsupportedOperationException}}), together with a method {{boolean o.a.c.m.util.linear.IterativeLinearSolverEvent.providesResidual()}}. I think some of us do not like {{UnsupportedOperationException}}, but this would be similar to what was done in {{RealLinearOperator.operateTranspose(RealVector)}}.
> ## create a new interface {{RealVector o.a.c.m.util.linear.IterativeLinearSolverWithResidualEvent}}. This is similar to what is done currently, see {{o.a.c.m.linear.ProvidesResidual}}.
> I would love to have some feedback on the last point.

--
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-735) Improvements to linear iterative solvers

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

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

Item 2 is implemented in {{r1237056}}.
                
> Improvements to linear iterative solvers
> ----------------------------------------
>
>                 Key: MATH-735
>                 URL: https://issues.apache.org/jira/browse/MATH-735
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.0
>            Reporter: Sébastien Brisard
>            Assignee: Sébastien Brisard
>              Labels: event, linear, solver
>
> Before we release version 3.0, I would like to perform some changes to the general framework for linear iterative solvers.
> # Remove interface {{InvertibleRealLinearOperator}}: this was only proposed for handling preconditioners. Let {{M}} be this preconditioner. In the course of the iterations, only matrix-vector products of the form {{M^(-1) . y}} are needed, never direct products {{M . x}}. So it's just as simple to provide {{M^(-1)}} as a standard {{RealLinearOperator}}, rather than {{M}} as an {{InvertibleRealLinearOperator}}. This removes a little bit of clutter in the class hierarchy.
> # {{o.a.c.m.util.IterationEvent}} should at the very least have a method to get the current iteration number. Overwise, I find myself keeping track of the number of times {{o.a.c.m.util.IterationManager.fireIterationPerformedEvent(IterationEvent)}} is called, which is both ugly and painfull.
> # {{o.a.c.m.util.linear.IterativeLinearSolverEvent}} should have a method to access the norm of the residual. I was reluctant to specify such a method in the interface at the start, because I was not sure any iterative solver provides an updated estimate of this quantity at each iteration. In fact, I've realized that most (if not all) solvers do, and it's quite nice to be able to access this value while monitoring the progress of the inversion (through {{o.a.c.m.utils.IterationListener}}). Otherwise, one has to compute {{b - A . x}} inside the listener, which *doubles* the cost of each iteration!
> # {{o.a.c.m.util.linear.IterativeLinearSolverEvent}} should have a method to access the residual (the vector itself, not only its norm). I'm not sure *all* solvers can do that, so this should be an optional feature, which might be useful. I see two different possible implementations
> ## specify {{RealVector o.a.c.m.util.linear.IterativeLinearSolverEvent.getResidual()}} as an optional feature (potentially throwing {{UnsupportedOperationException}}), together with a method {{boolean o.a.c.m.util.linear.IterativeLinearSolverEvent.providesResidual()}}. I think some of us do not like {{UnsupportedOperationException}}, but this would be similar to what was done in {{RealLinearOperator.operateTranspose(RealVector)}}.
> ## create a new interface {{RealVector o.a.c.m.util.linear.IterativeLinearSolverWithResidualEvent}}. This is similar to what is done currently, see {{o.a.c.m.linear.ProvidesResidual}}.
> I would love to have some feedback on the last point.

--
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