commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz (JIRA)" <>
Subject [jira] [Commented] (MATH-655) General framework for iterative algorithms
Date Sat, 03 Sep 2011 04:29:10 GMT


Phil Steitz commented on MATH-655:

Another option would be to use composition.  In a sense, what you have created in IterativeAlgorithm
is a generalization of the simple Incrementor that we already use composition to attach to
classes that maintain iteration counts.  Why not have the IterativeLinerarSolver include an
InterativeAlgorithm as a member and delegate the incrementing and event generation to the
member?  In that caae, it would probably make sense to change the name to something like IterationMonitor
or IterationManager or something like that.  In that way, what gets monitored, what events
get raised, how stopping criteria get introduced etc., can evolve and be customized independently
for the different classes; but reuse of the basic event propagation and exception generation
machinery can be provided in the base class.

> 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