All Downloads are FREE. Search and download functionalities are using the official Maven repository.

freak.core.searchspace.HasMetric Maven / Gradle / Ivy

There is a newer version: 0.4.7
Show newest version
/*
 * 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