gov.sandia.cognition.algorithm
Interface AnytimeAlgorithm<ResultType>

Type Parameters:
ResultType - The type of the result generated by the algorithm.
All Superinterfaces:
IterativeAlgorithm, StoppableAlgorithm
All Known Subinterfaces:
AnytimeBatchLearner<DataType,ResultType>, FunctionMinimizer<InputType,OutputType,EvaluatorType>, LineMinimizer<EvaluatorType>, MarkovChainMonteCarlo<ObservationType,ParameterType>, ParameterCostMinimizer<ResultType>, RootBracketer, RootFinder
All Known Implementing Classes:
AbstractAnytimeAlgorithm, AbstractAnytimeBatchLearner, AbstractAnytimeFunctionMinimizer, AbstractAnytimeLineMinimizer, AbstractAnytimeSupervisedBatchLearner, AbstractBaggingLearner, AbstractBaumWelchAlgorithm, AbstractBracketedRootFinder, AbstractMarkovChainMonteCarlo, AbstractMinimizerBasedParameterCostMinimizer, AbstractParameterCostMinimizer, AbstractRootFinder, AdaBoost, AffinityPropagation, AgglomerativeClusterer, AnytimeAlgorithmWrapper, BaggingCategorizerLearner, BaggingRegressionLearner, BatchMultiPerceptron, BaumWelchAlgorithm, BinaryBaggingLearner, CategoryBalancedBaggingLearner, CategoryBalancedIVotingLearner, DirichletProcessClustering, DirichletProcessMixtureModel, DistributionParameterEstimator, FletcherXuHybridEstimation, FunctionMinimizerBFGS, FunctionMinimizerConjugateGradient, FunctionMinimizerDFP, FunctionMinimizerDirectionSetPowell, FunctionMinimizerFletcherReeves, FunctionMinimizerGradientDescent, FunctionMinimizerLiuStorey, FunctionMinimizerNelderMead, FunctionMinimizerPolakRibiere, FunctionMinimizerQuasiNewton, GaussianContextRecognizer.Learner, GaussNewtonAlgorithm, GeneralizedHebbianAlgorithm, GeneticAlgorithm, IVotingCategorizerLearner, KernelAdatron, KernelBasedIterativeRegression, KernelPerceptron, KernelWeightedRobustRegression, KMeansClusterer, KMeansClustererWithRemoval, LatentDirichletAllocationVectorGibbsSampler, LeastSquaresEstimator, LentzMethod, LevenbergMarquardtEstimation, LineMinimizerBacktracking, LineMinimizerDerivativeBased, LineMinimizerDerivativeFree, LogisticRegression, MetropolisHastingsAlgorithm, MinimizerBasedRootFinder, MixtureOfGaussians.EMLearner, MixtureOfGaussians.Learner, MultiCategoryAdaBoost, OptimizedKMeansClusterer, ParallelBaumWelchAlgorithm, ParallelDirichletProcessMixtureModel, ParallelizedGeneticAlgorithm, ParallelizedKMeansClusterer, ParallelLatentDirichletAllocationVectorGibbsSampler, ParameterDerivativeFreeCostMinimizer, ParameterDifferentiableCostMinimizer, PartitionalClusterer, Perceptron, PrimalEstimatedSubGradient, ProbabilisticLatentSemanticAnalysis, RootBracketExpander, RootFinderBisectionMethod, RootFinderFalsePositionMethod, RootFinderNewtonsMethod, RootFinderRiddersMethod, RootFinderSecantMethod, ScalarMixtureDensityModel.EMLearner, SequentialMinimalOptimization, SimulatedAnnealer, SuccessiveOverrelaxation

@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

The AnytimeAlgorithm interface defines the functionality of an iterative algorithm that is stoppable and can return intermediate results.

Since:
2.0
Author:
Justin Basilico, Kevin R. Dixon
See Also:
IterativeAlgorithm, StoppableAlgorithm

Method Summary
 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.
 
Methods inherited from interface gov.sandia.cognition.algorithm.IterativeAlgorithm
addIterativeAlgorithmListener, getIteration, removeIterativeAlgorithmListener
 
Methods inherited from interface gov.sandia.cognition.algorithm.StoppableAlgorithm
isResultValid, stop
 

Method Detail

getMaxIterations

int getMaxIterations()
Gets the maximum number of total iterations before stopping.

Returns:
Maximum number of total iterations before stopping. Must be greater than zero.

setMaxIterations

void setMaxIterations(int maxIterations)
Sets the maximum number of total iterations before stopping.

Parameters:
maxIterations - Maximum number of iterations before stopping. Must be greater than zero.

getResult

ResultType getResult()
Gets the current result of the algorithm.

Returns:
Current result of the algorithm.