Defines methods for an algorithm that can be stopped early during its
execution. This is typically done so that a user can stop the algorithm
early through a user interface. Thus, it is recommended that all potentially
long-running algorithms implement the interface in order to be
Typically a StoppableAlgorithm will also be a
IterativeAlgorithm, but this is not enforced.
Requests that the algorithm stop at the next appropriate point.
Requests that the algorithm stop at the next appropriate point. The
stopping point is determined by the algorithm. The algorithm should try
to balance between stopping as soon as possible and leaving the results
in some consistent state.
Indicates whether or not the algorithm results are in a consistent state
or not. A StoppableAlgorithm may not always be able to stop in a
manner that makes its results valid. This method is used to check whether
the results are in a consistent state or not.
True if the results of the algorithm are in valid state and
false if they are not valid.