commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sébastien Brisard (JIRA) <>
Subject [jira] [Commented] (MATH-655) General framework for iterative algorithms
Date Fri, 02 Sep 2011 13:24:09 GMT


Sébastien Brisard commented on MATH-655:

A solution would be that all these families have {{IterativeAlgorithm}} as their common ancestor;
but it would have major (IMHO) drawbacks:
yes, that was what I had (naively) in mind. An alternative would be to change {{IterativeAlgorithm}}
into an interface, but I'm not so sure of the benefit it would have.
I intially wanted to have a clean framework to handle events occuring during the iterations
of *linear* solvers, and it came up on the ML that being a bit more general might be usefull.
Maybe I over-did it...
Anyway, what I can do for the time being is merge {{IterativeAlgorithm}} into {{IterativeLinearSolver}}.
Then, experience would probably reveal whether or not {{IterativeLinearSolver}} has some interesting
features which could be reused elsewhere, in which case an interface could be extracted later
on. What do you think of that?

> General framework for iterative algorithms
> ------------------------------------------
>                 Key: MATH-655
>                 URL:
>             Project: Commons Math
>          Issue Type: New Feature
>    Affects Versions: 3.0
>            Reporter: Sébastien Brisard
>            Priority: Minor
>              Labels: algorithm, events
>         Attachments:
> Following the thread [Monitoring iterative algorithms|],
here is a first attempt at defining a general enough framework for iterative algorithms at
large. At the moment, the classes provide support for
> * maximum number of iterations
> * events handling
> ** initialization event (prior to entering the main loop),
> ** iteration event (after completion of one iteration),
> ** termination event (after termination of the main loop).
> These classes do not yet provide support for a stopping criterion.
> Some points worth to note
> * For the time being, the classes are part of the o.a.c.m.linear package.
> * For the time being, {{IterativeAlgorithm.incrementIterationCount()}} throws a {{TooManyEvaluationsException}}.
If the proposed new feature is integrated into CM, then a proper {{TooManyIterationsException}}
should be created, from which the former could derive.

This message is automatically generated by JIRA.
For more information on JIRA, see:


View raw message