
freak.core.searchspace.HasMetric 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.searchspace;
import freak.core.population.*;
/**
* This interface can be implemented by search spaces in order to make a metric
* available. A metric allows the use of additional operators and fitness
* transformers on the search space, e.g. fitness sharing.
*
* The metric is assumed to be symmetric, so that
* getDistance(x, y) == getDistance(y, x)
* for alle genotypes x, y
.
*
* @author Heiko
*/
public interface HasMetric {
/**
* This method calculates the distance between two genotypes.
* All implementations have to ensure that
* getDistance(x, y) == getDistance(y, x)
.
* for alle genotypes x, y
.
*
* @return the distance between the two given genotypes.
*/
double getDistance(Genotype gt1, Genotype gt2);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy