org.dishevelled.swarm.fitness
Class CompositeFitness
java.lang.Object
org.dishevelled.swarm.fitness.CompositeFitness
- All Implemented Interfaces:
- Fitness
public final class CompositeFitness
- extends Object
- implements Fitness
Composite fitness function.
- Version:
- $Revision$ $Date$
- Author:
- Michael Heuer
|
Method Summary |
double |
score(double[] position)
Return a measure of fitness for the specified position. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CompositeFitness
public CompositeFitness(List<Fitness> children,
BinaryFunction<Double,Double,Double> aggregate)
- Create a new composite fitness function with the specified list
of child fitness functions and the specified aggregate function.
- Parameters:
children - list of child fitness functions, must not be
null and must contain at least one fitness functionaggregate - aggregate function, must not be null
score
public double score(double[] position)
- Return a measure of fitness for the specified position. The specified array
of doubles will not be null. The length of the array will be equal to the
number of dimensions for the position.
- Specified by:
score in interface Fitness
- Parameters:
position - position
- Returns:
- a measure of fitness for the specified position
Copyright © 2006-2012 dishevelled.org. All Rights Reserved.