/*
* File: IterativeLearnerListener.java
* Authors: Justin Basilico
* Company: Sandia National Laboratories
* Project: Cognitive Foundry
*
* Copyright August 30, 2006, Sandia Corporation. Under the terms of Contract
* DE-AC04-94AL85000, there is a non-exclusive license for use of this work by
* or on behalf of the U.S. Government. Export of this program may require a
* license from the United States Government. See CopyrightHistory.txt for
* complete details.
*
*/
package gov.sandia.cognition.algorithm;
import gov.sandia.cognition.annotation.CodeReview;
import gov.sandia.cognition.annotation.CodeReviews;
/**
* The {@code IterativeAlgorithmListener} interface defines the events that
* are generated by an {@code IterativeAlgorithm}. Events exist for the
* beginning/end of the algorithm and the beginning/end of each step of the
* iterative algorithm.
*
* @author Justin Basilico
* @since 2.0
* @see IterativeAlgorithm
*/
@CodeReviews(
reviews={
@CodeReview(
reviewer="Kevin R. Dixon",
date="2008-02-08",
changesNeeded=false,
comments="Class looks fine."
),
@CodeReview(
reviewer="Justin Basilico",
date="2006-10-02",
changesNeeded=false,
comments="Interface is fine."
)
}
)
public interface IterativeAlgorithmListener
{
/**
* This method is called when a algorithm has started, before the first
* step of the algorithm.
*
* @param algorithm
* The algorithm that has started.
*/
void algorithmStarted(
IterativeAlgorithm algorithm);
/**
* This method is called when the algorithm has ended, after the last step
* of the algorithm.
*
* @param algorithm
* The algorithm that has ended.
*/
void algorithmEnded(
IterativeAlgorithm algorithm);
/**
* This method is called when the algorithm has started a step in its
* execution.
*
* @param algorithm
* The algorithm that has started another step of its execution.
*/
void stepStarted(
IterativeAlgorithm algorithm);
/**
* This method is called when the algorithm has ended a step of its
* execution.
*
* @param algorithm
* The algorithm that has ended another step of its execution.
*/
void stepEnded(
IterativeAlgorithm algorithm);
}