public class CountMonitor<S> extends Object implements IterationMonitor<S>
IterationMonitor
counts the number of iterates generated, hence
the number of iterations.
Note that the initial guess of solution is usually added
as the first iterate. Therefore, method getCount()
normally
return an integer greater than or equal to 1 if the iterative method is
implemented properly.Constructor and Description |
---|
CountMonitor() |
Modifier and Type | Method and Description |
---|---|
void |
addIterate(S s)
Record a new iteration state.
|
int |
getCount()
Get the number of iterations.
|
public void addIterate(S s)
IterationMonitor
addIterate
in interface IterationMonitor<S>
s
- the new iteration statepublic int getCount()
Copyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.