|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectDistributedEvolutionaryAlgorithmsFramework.FitnessFunction
public abstract class FitnessFunction
Abstract class for user-defined fitness function
| Field Summary | |
|---|---|
protected double[] |
maxRestrictions
Array of upper restrictions for all dimensions |
protected double[] |
minRestrictions
Array of lower restrictions for all dimensions |
protected int |
specimenLength
Length of genotype / number of dimensions. |
| Constructor Summary | |
|---|---|
FitnessFunction(int length)
Contructor, takes length of genotype/number of dimensions and initializes restriction arrays |
|
| Method Summary | |
|---|---|
abstract double |
evaluate(double[] genotype)
|
abstract double |
evaluate(org.apache.hadoop.io.DoubleWritable[] s)
|
int |
getDimensions()
|
double |
getMaxRestriction(int i)
|
double |
getMinRestriction(int i)
|
double |
getRandomValueInDomains(int index)
|
void |
setMaxRestriction(double[] m)
Set maximal constraints for each dimension of specimen |
void |
setMinRestriction(double[] m)
Set minimal constraints for each dimension of specimen |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int specimenLength
protected double[] minRestrictions
protected double[] maxRestrictions
| Constructor Detail |
|---|
public FitnessFunction(int length)
length - Length of genotype / number of dimensions.| Method Detail |
|---|
public abstract double evaluate(org.apache.hadoop.io.DoubleWritable[] s)
s - Array of DoubleWritables representing genotype
public abstract double evaluate(double[] genotype)
genotype - Array of doubles representing genotype
public double getMinRestriction(int i)
i - Number of requested dimension
public double getMaxRestriction(int i)
i - Number of requested dimension
public int getDimensions()
public void setMinRestriction(double[] m)
m - Constraintspublic void setMaxRestriction(double[] m)
m - Constraintspublic double getRandomValueInDomains(int index)
index - dimension number
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||