commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles (JIRA)" <>
Subject [jira] [Commented] (MATH-807) Allow for the use of Incrementor.MaxCountExceededCallback in IterationManager
Date Fri, 22 Jun 2012 11:09:42 GMT


Gilles commented on MATH-807:

Is it the callback which you want to be able to customize, or do you really want to let an
external code fiddle with the counter?
If it's the former, it would be sufficient to have
public IterationManager(int maxIterations,
                        Incrementor.MaxCountExceededCallback cb) {
    this.iterations = new Incrementor(maxIterations, cb);
    // ...

> Allow for the use of Incrementor.MaxCountExceededCallback in IterationManager
> -----------------------------------------------------------------------------
>                 Key: MATH-807
>                 URL:
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.1
>            Reporter: S├ębastien Brisard
>            Assignee: S├ębastien Brisard
>              Labels: iterative
>             Fix For: 3.0
> {{IterationManager}} uses {{Incrementor}} for the iterations book-keeping. When the maximum
number of iterations is reached, the default behavior is to throw a {{MaxCountExceededException}}
unless a {{MaxCountExceededCallback}} was passed to the constructor of {{Incrementor}}.
> In the current implementation of {{IterationManager}}, this feature is hidden. It is
proposed to add a new constructor {{IterationManager(Incrementor)}}, which would permit the
use of call-back methods through the use of appropriately initialized incrementors.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message