| Modifier and Type | Field and Description |
|---|---|
| private IntegerSequence. | iterations
Keeps a count of the number of iterations. |
| private final Collection | listeners
The collection of all listeners attached to this iterative algorithm. |
| Access | Constructor and Description |
|---|---|
| public | IterationManager(final int
the maximum number of iterations maxIterations)Creates a new instance of this class. |
| public | IterationManager(final int
the maximum number of iterations maxIterations, final Incrementor.the function to be called when the maximum number of
iterations has been reached callBack
Deprecated
as of 3.6, replaced with
IterationManager(int,
org.
Creates a new instance of this class. |
| public | IterationManager(final int
the maximum number of iterations maxIterations, final IntegerSequence.the function to be called when the maximum number of
iterations has been reached callBackCreates a new instance of this class. |
| Modifier and Type | Method and Description |
|---|---|
| public void | addIterationListener(final IterationListener
A listener)IterationListener object.Attaches a listener to this manager. |
| public void | fireInitializationEvent(final IterationEvent
The e)IterationEvent object.Informs all registered listeners that the initial phase (prior to the main iteration loop) has been completed. |
| public void | fireIterationPerformedEvent(final IterationEvent
The e)IterationEvent object.Informs all registered listeners that a new iteration (in the main iteration loop) has been performed. |
| public void | fireIterationStartedEvent(final IterationEvent
The e)IterationEvent object.Informs all registered listeners that a new iteration (in the main iteration loop) has been started. |
| public void | fireTerminationEvent(final IterationEvent
The e)IterationEvent object.Informs all registered listeners that the final phase (post-iterations) has been completed. |
| public int | Returns: the number of iterations.Returns the number of iterations of this solver, 0 if no iterations has been performed yet. |
| public int | Returns: the maximum number of iterations.Returns the maximum number of iterations. |
| public void | incrementIterationCount()
Increments the iteration count by one, and throws an exception if the maximum number of iterations is reached. |
| public void | removeIterationListener(final IterationListener
The listener)IterationListener to be removed.Removes the specified iteration listener from the list of listeners
currently attached to |
| public void |
| iterations | back to summary |
|---|---|
| private IntegerSequence. Keeps a count of the number of iterations. | |
| listeners | back to summary |
|---|---|
| private final Collection<IterationListener> listeners The collection of all listeners attached to this iterative algorithm. | |
| IterationManager | back to summary |
|---|---|
| public IterationManager(final int maxIterations) Creates a new instance of this class.
| |
| IterationManager | back to summary |
|---|---|
| public IterationManager(final int maxIterations, final Incrementor. Deprecated as of 3.6, replaced with Creates a new instance of this class.
| |
| IterationManager | back to summary |
|---|---|
| public IterationManager(final int maxIterations, final IntegerSequence. Creates a new instance of this class.
| |
| addIterationListener | back to summary |
|---|---|
| public void addIterationListener(final IterationListener listener) Attaches a listener to this manager.
| |
| fireInitializationEvent | back to summary |
|---|---|
| public void fireInitializationEvent(final IterationEvent e) Informs all registered listeners that the initial phase (prior to the main iteration loop) has been completed.
| |
| fireIterationPerformedEvent | back to summary |
|---|---|
| public void fireIterationPerformedEvent(final IterationEvent e) Informs all registered listeners that a new iteration (in the main iteration loop) has been performed.
| |
| fireIterationStartedEvent | back to summary |
|---|---|
| public void fireIterationStartedEvent(final IterationEvent e) Informs all registered listeners that a new iteration (in the main iteration loop) has been started.
| |
| fireTerminationEvent | back to summary |
|---|---|
| public void fireTerminationEvent(final IterationEvent e) Informs all registered listeners that the final phase (post-iterations) has been completed.
| |
| getIterations | back to summary |
|---|---|
| public int getIterations() Returns the number of iterations of this solver, 0 if no iterations has been performed yet.
| |
| getMaxIterations | back to summary |
|---|---|
| public int getMaxIterations() Returns the maximum number of iterations.
| |
| incrementIterationCount | back to summary |
|---|---|
| public void incrementIterationCount() throws MaxCountExceededException Increments the iteration count by one, and throws an exception if the maximum number of iterations is reached. This method should be called at the beginning of a new iteration.
| |
| removeIterationListener | back to summary |
|---|---|
| public void removeIterationListener(final IterationListener listener) Removes the specified iteration listener from the list of listeners
currently attached to
| |
| resetIterationCount | back to summary |
|---|---|
| public void resetIterationCount() Sets the iteration count to 0. This method must be called during the initial phase. | |