ResultType - The type of the result generated by the algorithm.@CodeReview(reviewer="Kevin R. Dixon", date="2008-02-08", changesNeeded=false, comments="Interface looks fine.") @PublicationReference(author="Shlomo Zilberstein", title="Using Anytime Algorithms in Intelligent Systems", type=Journal, publication="AI Magazine", year=1996, pages={73,83}, url="http://anytime.cs.umass.edu/~shlomo/papers/aimag96.pdf") public interface AnytimeAlgorithm<ResultType> extends IterativeAlgorithm, StoppableAlgorithm
AnytimeAlgorithm interface defines the functionality of an
iterative algorithm that is stoppable and can return intermediate results.IterativeAlgorithm,
StoppableAlgorithm| Modifier and Type | Method and Description |
|---|---|
int |
getMaxIterations()
Gets the maximum number of total iterations before stopping.
|
ResultType |
getResult()
Gets the current result of the algorithm.
|
void |
setMaxIterations(int maxIterations)
Sets the maximum number of total iterations before stopping.
|
addIterativeAlgorithmListener, getIteration, removeIterativeAlgorithmListenerisResultValid, stopint getMaxIterations()
void setMaxIterations(int maxIterations)
maxIterations - Maximum number of iterations before stopping. Must be greater
than zero.ResultType getResult()