FitnessEvaluation.Sudoku
Class SudokuFit

java.lang.Object
  extended by FitnessEvaluation.Sudoku.SudokuFit
All Implemented Interfaces:
FitnessFunction, ParameterI

public class SudokuFit
extends java.lang.Object
implements FitnessFunction


Constructor Summary
SudokuFit()
          Creates a new instance of SudokuFit
 
Method Summary
 boolean canCache()
          Return true if it is ok to cache the results of the fitness function
 int checkBox(int[] grid, int x, int y)
           
 int checkLine(int[] grid, int start, int diff)
           
 double evaluate(int[] grid)
           
 void getFitness(Individual i)
          Creates a new instance of FitnessEvaluator
 void parsePhen(java.lang.String p)
           
 void resetMatch()
           
 void setProperties(java.util.Properties p)
          Set properties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SudokuFit

public SudokuFit()
Creates a new instance of SudokuFit

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 -

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

getFitness

public void getFitness(Individual i)
Description copied from interface: FitnessFunction
Creates a new instance of FitnessEvaluator

Specified by:
getFitness in interface FitnessFunction
Parameters:
i - Evaluated individual

parsePhen

public void parsePhen(java.lang.String p)

evaluate

public double evaluate(int[] grid)

checkLine

public int checkLine(int[] grid,
                     int start,
                     int diff)

checkBox

public int checkBox(int[] grid,
                    int x,
                    int y)

resetMatch

public void resetMatch()