FitnessEvaluation.ParityProblem
Class BooleanInterpreter

java.lang.Object
  extended by FitnessEvaluation.ParityProblem.BooleanInterpreter
All Implemented Interfaces:
FitnessFunction, ParameterI

public class BooleanInterpreter
extends java.lang.Object
implements FitnessFunction

Interpreter for parity problems.

Author:
erikhemberg

Constructor Summary
BooleanInterpreter()
           
BooleanInterpreter(int size)
           
BooleanInterpreter(java.util.Properties p)
           
 
Method Summary
 boolean canCache()
          Return true if it is ok to cache the results of the fitness function
 void getFitness(Individual ind)
          Split the phenotype of the individual.
 void setInfix(boolean infix)
           
 void setParities(int size)
           
 void setParitiesValues(int size)
           
 void setProperties(java.util.Properties p)
          Set properties
 void setRevesePolish(ReversePolish revesePolish)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BooleanInterpreter

public BooleanInterpreter()

BooleanInterpreter

public BooleanInterpreter(java.util.Properties p)

BooleanInterpreter

public BooleanInterpreter(int size)
Method Detail

setProperties

public void setProperties(java.util.Properties p)
Description copied from interface: ParameterI
Set properties

Specified by:
setProperties in interface ParameterI
Parameters:
p - object containing properties

setParitiesValues

public void setParitiesValues(int size)

setParities

public void setParities(int size)

getFitness

public void getFitness(Individual ind)
Split the phenotype of the individual. Calculate the fitness as the sum of the squared distance to the target. Errors in the calculation will lead to default fitness

Specified by:
getFitness in interface FitnessFunction
Parameters:
ind - Individual that will be evaluated and assigned fitness

setRevesePolish

public void setRevesePolish(ReversePolish revesePolish)

setInfix

public void setInfix(boolean infix)

canCache

public boolean canCache()
Description copied from interface: FitnessFunction
Return true if it is ok to cache the results of the fitness function

Specified by:
canCache in interface FitnessFunction