net.sourceforge.cilib.util.calculator
Interface FitnessCalculator<T>

Type Parameters:
T - The type to which a fitness calculation is to be performed.
All Superinterfaces:
Cloneable, Serializable
All Known Implementing Classes:
EntityBasedFitnessCalculator, PropertyBasedFitnessCalculator, StructuredTypeFitnessCalculator

public interface FitnessCalculator<T>
extends Cloneable

Perform the calculation of the fitness for the given Entity, decoupling the Entity from the Problem.


Method Summary
 FitnessCalculator<T> getClone()
          Create a cloned copy of the current object and return it.
 Fitness getFitness(T entity, boolean count)
          Get the fitness, given the position.
 

Method Detail

getClone

FitnessCalculator<T> getClone()
Create a cloned copy of the current object and return it. In general the created copy will be a deep copy of the provided instance. As a result this operation an be quite expensive if used incorrectly.

Specified by:
getClone in interface Cloneable
Returns:
An exact clone of the current object instance.
See Also:
Object.clone()

getFitness

Fitness getFitness(T entity,
                   boolean count)
Get the fitness, given the position.

Parameters:
entity - The Type to base the calculation on.
count - Whether or not the evaluation is to be counted.
Returns:
A Fitness object representing the fitness of the position.


Copyright © 2009 CIRG. All Rights Reserved.