001/* 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017package org.apache.commons.math3.util; 018 019import java.util.EventListener; 020 021/** 022 * The listener interface for receiving events occurring in an iterative 023 * algorithm. 024 * 025 */ 026public interface IterationListener extends EventListener { 027 /** 028 * Invoked after completion of the initial phase of the iterative algorithm 029 * (prior to the main iteration loop). 030 * 031 * @param e The {@link IterationEvent} object. 032 */ 033 void initializationPerformed(IterationEvent e); 034 035 /** 036 * Invoked each time an iteration is completed (in the main iteration loop). 037 * 038 * @param e The {@link IterationEvent} object. 039 */ 040 void iterationPerformed(IterationEvent e); 041 042 /** 043 * Invoked each time a new iteration is completed (in the main iteration 044 * loop). 045 * 046 * @param e The {@link IterationEvent} object. 047 */ 048 void iterationStarted(IterationEvent e); 049 050 /** 051 * Invoked after completion of the operations which occur after breaking out 052 * of the main iteration loop. 053 * 054 * @param e The {@link IterationEvent} object. 055 */ 056 void terminationPerformed(IterationEvent e); 057}