/*
 * SelectionOperator.java
 *
 * Created on 16. listopad 2005, 13:02
 *
 * To change this template, choose Tools | Options and locate the template under
 * the Source Creation and Management node. Right-click the template and choose
 * Open. You can then make changes to the template in the Source Editor.
 */

package cz.pcland.ga.selection;
import cz.pcland.ga.BaseIndividual;
import java.util.*;

public interface SelectionOperator {
   
    /**
     * Public name of this operator
     */
    abstract public String toString();


    /**
     * Called before every selection
     */
    abstract public void init(BaseIndividual[] population, double sumOfFitness);
    
    /**
     * Called at the begining of run before first evaluation and after population is fully created
     */
    abstract public void onStart(BaseIndividual[] population);
    
    /**
     * Method representing selection operator itself.
     */
    abstract public BaseIndividual select(BaseIndividual[] population, int popSize, double sumOfFitness) throws SelectionException;
}
