
freak.core.fitness.FitnessFunction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of freak-core Show documentation
Show all versions of freak-core Show documentation
Core library of the Free Evolutionary Algorithm Toolkit
/*
* This file is part of FrEAK. For licensing and copyright information
* please see the file COPYING in the root directory of this
* distribution or contact .
*/
package freak.core.fitness;
import freak.core.modulesupport.*;
import freak.core.modulesupport.Module;
import freak.core.population.*;
/**
* The interface for a fitness function. A fitness function evaluates
* individuals and can provide some optional operations that give further
* information about the fitness function. In FrEAK, single objective and multi
* objective fitness functions are distinguished. Therefore, the interfaces
* SingleObjectiveFitnessFunction
and MultiObjectiveFitnessFunction
,
* which extend this interface, contain more specialized methods.
*
* @author Dirk, Heiko, Michael
*/
public interface FitnessFunction extends Module {
/**
* Returns an optimal phenotype, if an optimum exists and is known.
* Otherwise, an UnsupportedOperationException
is thrown.
*
* @return an optimal phenotype.
* @throws UnsupportedOperationException if the optimum is unknown.
*/
public abstract Genotype getPhenotypeOptimum() throws UnsupportedOperationException;
/**
* Returns a genotype of the optimal phenotype, if an optimum exists and
* is known and a mapper can translate the phenotype to genotype.
* Otherwise, an UnsupportedOperationException
is thrown.
*
* @return an optimal phenotype.
* @throws UnsupportedOperationException if the optimum is unknown.
*/
public abstract Genotype getGenotypeOptimum() throws UnsupportedOperationException;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy